I am new to AngularJs. While learning ,i am seeing these two types of controller declarations.
Can you guys just tell me the significance of each type mentioned below.
Type 1:
var myApp = angular.module('myApp',[]);
myApp.controller('DoubleController', ['$scope', function($scope) {
$scope.letter="A";
}]);
Type 2:
var myApp = angular.module('myApp',[]);
myApp.controller('DoubleController', [ function($scope) {
$scope.letter="A";
}]);