angularjs - Add a wrapper around a fieldGroup -


i have create following jsbin

notice how fieldgroup not display because of wrapper setting. if remove/comment out wrapper fields display.

ultimately, pushing objects fieldgroup service call. want each of these items within group <li> overall <ul>. wrapped each individual field <li> wrapper , planning on wrapping entire fieldgroup <ul> wrapper. formly doesn't seem approach.

what doing wrong? or there better way of making list?

unfortunately fieldgroup doesn't support wrappers, , adding them mean adding complexity angular-formly.

fortunately there's simple way accomplish same results using custom templates:

  app.config(function (formlyconfigprovider) {      // set templates here     formlyconfigprovider.settype({       name: 'nested',       template: '<formly-form model="model[options.key]" fields="options.data.fields"></formly-form>'     });      formlyconfigprovider.setwrapper({       name: 'panel',       types: ['nested'],       templateurl: 'panel.html'     });    }); 

see full example: http://angular-formly.com/#/example/other/nested-formly-forms


Comments