formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.22k stars 405 forks source link

how can i call a function of my controller after complete field in formly? :( #683

Closed pichlou closed 8 years ago

pichlou commented 8 years ago
Blaze34 commented 8 years ago

What do You mean "complete field"? Maybe You have some live example?

pichlou commented 8 years ago

when dynamic field is completed,call a function,i.e:when complete creating select or input element,i'm calling my custom javascript function in my controller,element is not exist with access it by selector,but it is available in my page elements with specific class,this mean element in controller not create completely is there a function that i call my custom javascript function after complete assign element specification? :(

Blaze34 commented 8 years ago

I don't know any callbacks. As an option You can use

templateOptions: {
  callback: () => { ... }
}

and in template add ng-init="to.callback()"

It's just idea =)

pichlou commented 8 years ago

thanks for your answer,my format is json,and problem really is this,in json format i cant use function in callback or link function :))