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