Which is preferable controller or link function in AngularJS directives?
Angular docs said:
Best Practice : use controller when you want to expose an API to other directives. Otherwise use link.
Why should we use link functions if we don't have any APIs to expose from the directive and if there is no data to share between the directives?
链接地址: http://www.djcxy.com/p/77918.html上一篇: 预先输入时设置输入无效