angular 控制器的使用两种模式
angular.module("myApp",[])
.controller("firstCtrl",["$scope",function(zhaowanhua){
//固定模式:使用该模式,可以自定义参数名字,该例,zhaowanhua = $scope
//建议使用此模式
}])
.controller("SecondCtrl",function($scope){
//此模式不可以自定义参数名
})
我的segmentfault地址 : https://segmentfault.com/u/winward