In AngularJS, what's the purpose of injecting a dependency as an array element and as an argument?
For example:
.controller('foobar', ['$scope','$mdDialog', function ($scope, $mdDialog) {}
But
.controller('foobar', function ($scope){}
is also valid?