angular-formly-templates-bootstrap
Version:
Angular-Formly plugin which outputs bootstrap compatible form fields.
23 lines (21 loc) • 590 B
JavaScript
export default ngModule => {
ngModule.config(addRadioType);
function addRadioType(formlyConfigProvider) {
formlyConfigProvider.setType({
name: 'radio',
template: require('./radio.html'),
wrapper: ['bootstrapLabel', 'bootstrapHasError'],
defaultOptions: {
noFormControl: false
},
apiCheck: check => ({
templateOptions: {
options: check.arrayOf(check.object),
labelProp: check.string.optional,
valueProp: check.string.optional,
inline: check.bool.optional,
}
})
});
}
};