You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `sfField` builder adds the `sf-field="..."` directive to *the first child element* in the template,
228
+
giving it a correct value. The value is an id number that identifies that specific form object.
229
+
230
+
The `sf-field` directive exports the form definition object as `form` on scope and as a lot of useful functions.
231
+
232
+
As a rule of thumb you always want this builder.
233
+
234
+
### builders.condition
235
+
The `condition` builder checks the form definition for the option `condition`. If it's present it adds a
236
+
`ng-if` to all top level elements in the template.
237
+
238
+
You usually want this as well.
239
+
240
+
### builder.ngModel
241
+
The `ngModel` builder is maybe the most important builder. It makes sure you get a proper binding to
242
+
your model value.
243
+
244
+
The `ngModel` builder queries the DOM of the template for all elements that have the attribute `sf-field-model`. Your template may have several of them. `sf-field-model` is *not* a directive,
245
+
but depending on it's value the `ngModel` builder will take three different actions.
246
+
247
+
248
+
#### sf-field-model
249
+
Just `sf-field-model` or `sf-field-model=""` tells the builder to add a `ng-model` directive to this element.
0 commit comments