I'm learning Angular and was just explaining to a colleague about controllers when they asked why $scope was passed in twice
['$scope', function($scope) {
Can anyone enlighten us?
myApp.controller('appList', ['$scope', function($scope) {
$scope.things = [
{
"name":"Cheese",
"id":"1",
"short-name":"ch"
},
{
"name":"Bread",
"id":"2",
"short-name":"br"
},
{
"name":"Wine",
"id":"3",
"short-name":"wi"
}
];
}]);
This example we were writing is overly simple we know.