例如這樣app.controller('myCtrl', function($scope, $rootScope) { // 將$rootScope改成其他名字就不行了。 $scope.names = ["Emil", "Tobias", "Linus"]; $rootScope.lastname = "Refsnes";});angular是怎么知道我第二個參數(shù)需要$rootScope?
angularjs怎么知道回調(diào)函數(shù)里需要什么參數(shù)?
鴻蒙傳說
2018-11-22 22:19:40