I'm starting to learn angular but I'm having troubles to manage dependencies and can't see why this isn't working.
My html :
Title
application.js:
(function ()
{
var app = angular.module('client', ['logged-directives', 'login-directives']);
// Controller which contains informations on the session (connected or not, user informations...)
app.controller('ApplicationController', function($scope){
$scope.isLogged = false; // Contains true if the user is Logged into the software
$scope.currentUser = null;
});
})();
logged-directives :
(function(){
var app = angular.module('logged-directives', []);
app.directive('loggedContent', function(){
return{
restrict : 'E',
templateUrl : 'logged-content.html',
}
});
});
login-directives :
(function(){
var app = angular.module('login-directives', []);
app.directive('loginContent', function(){
return{
restrict : 'E',
templateUrl : "includes/files/login/login-content.html",
controller: function($scope) {
this.validateLogin = function(user) {
alert("user:"+ user.login + " pass : "+user.password);
isLogged = true;
currentUser = user;
};
},
controllerAs: "review"
}
});
})();
When i open my html file in chrome i have the following error :
Error: [$injector:nomod] Module 'logged-directives' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
(I didn't include login-directives because it's the same and it is not required to understand the issue, I have the same problem with login-directives)
Am I missing something?
Thank you for your help!