阅读背景:

AngularJS在指令模板中评估$rootScope变量

来源:互联网 

I have a directive that creates an input field. I need to set the ng-model attribute of this input field to the value of a $rootScope variable. The reason behind this is that I want the input field to be in the layout, and bind to different models depending on what page is loaded. I thought I'd set this global variable in each controller and access it in the Directive. I have a directive that creates an input field.




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: