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

angular.js - Why can't I directly write the name of the controller when specifying the controller in the angularjs route?
PHP中文網(wǎng)
PHP中文網(wǎng) 2017-05-15 16:58:46
0
1
539

Writing like this works: controller: 'loginctrl as loginctrl'
It doesn't work when I write controller: 'loginctrl'. What's going on?

PHP中文網(wǎng)
PHP中文網(wǎng)

認(rèn)證高級PHP講師

reply all(1)
阿神

ng1.2 introduced controllerAs, which is what you use ctrl as ctrl, mainly to avoid having to inject $scope and the lightweight controller itself.

If you want to use the original ng-controller. You cannot use this to bind scope, and you have to manually inject $scope.

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