Closed bbeyssac closed 8 years ago
This code don't works if ng-class="to.className" is not defined in the "radio.html" template.
formlyConfigProvider.setType({
name : 'boolean',
extends : 'checkbox',
defaultOptions : {
templateOptions : {
className : 'md-primary'
}
}
});
This case works, if i force class name in the fields form : { "key" : "confidential", "type : "boolean", "templateOptions" : { "className" : 'md-primary' } }
I don't undersand why.
@bbeyssac I don't know exactly what you want to achieve and what's the problem. Could you explain it to me a little bit?
@bbeyssac Currently
templateOptions.className
is pointing to element withngModel
directive so in that case it ismdRadioGroup
.It would be nice if each
mdRadioButton
hadclassNameProp
or something similar tovalueProp
andlabelProp
convention. So user would be able to add different classes for different options.Do you want to try? :) I can help you