AngularJS Link function not called

前端 未结 4 1150
一整个雨季
一整个雨季 2021-01-04 04:18

I\'m trying to write my first AngularJS directive: one involving the link function. The directive is being loaded, but when I use it in my page the link<

4条回答
  •  轮回少年
    2021-01-04 05:06

    I had a different problem: an ng-include in the same element was trying to include an empty string ("") and so didn't let the directive link(), for some reason.

    By having a page available in the ng-include, the link() was called as expected.

提交回复
热议问题