0
이 둘은 같은가요?AngularJS 컨트롤러를 선언하는 두 가지 방법의 차이점은 무엇입니까?
후자는 컨트롤러를 작성하기위한 "약식"입니까?
angular.module("root", [])
.controller("index", ["$scope", function ($scope) {
// ..
}]);
angular.module("root", [])
.controller("index", function ($scope) {
// ..
});
대 감사합니다!
이 질문은 여기에 대한 답변 http://stackoverflow.com/questions/13362921/globally-defined-angularjs-controllers-and-encapsulation – JoakimB