Howard Bash
asked on
AngularJS Controller Module Stuck
I was going through a tutorial on AngularJS. During the tutorial I needed to make controller file which I paste below:
Unfortunately, when I initially created this module I left off the efController value and instead had written the following;
Which understandably failed to run and broke at that line with the omitted efController value. So, I typed it in and attempted to run. However, the project keeps failing on that same line ignoring the correction. There is some caching or temp file(s) that are causing this I think, but I haven't any idea where.
Any advise on this would be great.
Thanks!
angularForms.controller('efController',
function efController($scope, efService) {
$scope.employee = efService.employee;
});
Unfortunately, when I initially created this module I left off the efController value and instead had written the following;
angularForms.controller('',
function efController($scope, efService) {
$scope.employee = efService.employee;
});
Which understandably failed to run and broke at that line with the omitted efController value. So, I typed it in and attempted to run. However, the project keeps failing on that same line ignoring the correction. There is some caching or temp file(s) that are causing this I think, but I haven't any idea where.
Any advise on this would be great.
Thanks!
use jsfiddle.net or ctrl-f5 to reload the page
ASKER
I have tried ctrl-f5 and that hasn't fixed this. Also, jsfiddle.net is a site for working on JavaScript and so I'm not sure how that ties in with the issue I posted here. Please explain.
I believe you are not injecting the scope and efService.
angularForms.controller('e fControlle r', ['$scope', 'efService',
function efController($scope, efService) {
$scope.employee = efService.employee;
}]);
angularForms.controller('e
function efController($scope, efService) {
$scope.employee = efService.employee;
}]);
ASKER
Not clear why you would say that. Can you provide more detail?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.