亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

angular.js - Dynamically change submodule ng-controller
ringa_lee
ringa_lee 2017-05-15 16:58:36
0
3
586

Controller that wants to dynamically control the loading of submodules

ng-controller="{{myCtrl}}"

But this will cause an error and the system will prompt that myCtrl is not a function.

It should be a rendering priority problem, that is, the ng-controller renders too fast, and the subsequent variable values ????have not yet been obtained.

Please give me some advice, what should I do about this?

ringa_lee
ringa_lee

ringa_lee

reply all(3)
Ty80

Why do we need to add double brackets? If myCtrl是個正確controller, just remove the double brackets and write directly.

巴扎黑

Obviously angular parses the parameters of the ngController directive as strings, not expressions!

Ty80

ng-controller="myCtrl" is fine. . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template