javascript - Angular-formly. SetType options -


when creating new type settype in angular-formly how display options in template.

i want type named category displays label on webpage, how gwt label name?

my code far:

//new type adding category label formlyconfig.settype([       {             name:'category',             template: '<div><center><b>"options.label"</b></center></div>'       } ]); 

print variable want display on page, formlyfield formly array.

formlyfield.push(      {             type: 'category',             templateoptions: {                 label: print             }       } ); 

try this:

//new type adding category label formlyconfig.settype([       {             name:'category',             template: '<div><center><b>{{options.label}}</b></center></div>'       } ]); 

and fields

formlyfield.push(      {             type: 'category',             templateoptions: {                 label: 'print'             }       } ); 

Comments