D
D
Damir Sayahov2016-02-25 15:44:45
Angular
Damir Sayahov, 2016-02-25 15:44:45

What is the difference in Angular controller description?

app.controller('ChuckCtrl',['$scope', '$http', function($scope, $http){

}]);

app.controller('ChuckCtrl', function($scope, $http){

});

It seems to work the same way.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lega, 2016-02-25
@damir_sayahov

When you minify your code, the variables ($scope, $http) will change to something like (a, b) and then the second option will not work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question