Ich bin neu in AngularJs. Während des Lernens sehe ich diese beiden Arten von Controller-Deklarationen.AngularJS Controller Konstruktor Funktion Deklaration Signifikanz
Können Sie mir nur die Bedeutung der unten genannten Typen sagen.
Typ 1:
var myApp = angular.module('myApp',[]);
myApp.controller('DoubleController', ['$scope', function($scope) {
$scope.letter="A";
}]);
Typ 2:
var myApp = angular.module('myApp',[]);
myApp.controller('DoubleController', [ function($scope) {
$scope.letter="A";
}]);
** Danke Arans. ** –