angular 控制器的使用两种模式

angular.module("myApp",[])

.controller("firstCtrl",["$scope",function(zhaowanhua){

  //固定模式:使用该模式,可以自定义参数名字,该例,zhaowanhua =  $scope

  //建议使用此模式

}])

.controller("SecondCtrl",function($scope){

  //此模式不可以自定义参数名

})

 



posted @ 2016-10-14 13:49  赵皖华  阅读(228)  评论(0编辑  收藏  举报