AngularJS directive which takes JSON representing a form and renders to HTML
Hey Guys, I need to add a css class to div element containing a fieldGroup form. any suggestion how to do that?
Whatever className I provide to fieldGroup, It gets added correctly and as expected to form element, But for adding a css class to the parent div, I am not able to figure it out.
For e.g.
fields = [
{
className: 'row',
fieldGroup: [...]
}
]
Gives me this:
<div formly-field="" class="formly-field ng-scope ng-isolate-scope formly-field-group" ...>
<ng-form class="row formly ng-pristine ng-valid ng-scope ng-isolate-scope" ...>
</ng-form></div>
What I need is :
<div formly-field="" class=" MY_ROW_CONTAINER_CLASS formly-field ng-scope ng-isolate-scope formly-field-group" ...>
<ng-form class="row formly ng-pristine ng-valid ng-scope ng-isolate-scope" ...>
</ng-form></div>
Please help. Thanks
Hey Guys, I need to add a css class to div element containing a fieldGroup form. any suggestion how to do that?
Whatever className I provide to fieldGroup, It gets added correctly and as expected to form element, But for adding a css class to the parent div, I am not able to figure it out.
For e.g.
fields = [
{
className: 'row',
fieldGroup: [...]
}
]
Gives me this:
<div formly-field="" class="formly-field ng-scope ng-isolate-scope formly-field-group" ...>
<ng-form class="row formly ng-pristine ng-valid ng-scope ng-isolate-scope" ...>
</ng-form>
</div>
What I need is :
<div formly-field="" class=" MY_ROW_CONTAINER_CLASS formly-field ng-scope ng-isolate-scope formly-field-group" ...>
<ng-form class="row formly ng-pristine ng-valid ng-scope ng-isolate-scope" ...>
</ng-form>
</div>
Please help!
In templateOptions
notNull: true
definitely works if you're using the bootstrap templates Bootstrap templates