What is the default for AngularJS directive scope?

后端 未结 2 1678
执念已碎
执念已碎 2020-12-31 06:31

What is the default scope value of an AngularJS directive?

Of course, it is not isolated scope. It is true or false.

I can\'t find any documentation on wha

2条回答
  •  被撕碎了的回忆
    2020-12-31 07:14

    By default, directives shared the scope of the containing controller. You can specify scope:true to have a inherited scope and to get a isolated scope you have to do the following

    scope:{
    something1:"@",
    something2:"="
    something3:"&"
    }
    

提交回复
热议问题