So I was using this website to show me the basics: https://www.codeproject.com/Articles/1130132/Learn-AngularJS-for-Beginners
and on the scope inheritance section I was thrown off because of the controller used for that example compared to the example controller used as intro to controllers.
what is the difference between:
app.controller("PersonController", function($scope) {
$scope.employeeData = personData;
$scope.employeeMethod = function() {
console.log("Hello, I am an Employee");
}
});
and
app.controller("MainController", ['$scope', function($scope){
$scope.name = "Donald";
$scope.color = "White";
}]);
as in the first one is name then function, the second is name then bracket.