2016-07-13 2 views
1

Fehler in Winkel js ncaught Fehler beim Modell zeigt: [$ Injektor: modulerr]
Controller myApp.controller ('Usercontroller' [ '$ scope ', function ($ scope) { }]);

model app.js 


var myApp = angular.module('myApp',['ngRoute', 'ngCookie']);  

myApp.config(['$routeProvider','$locationProvider', 
    function($routeProvider,$locationProvider){ 

     $locationProvider.html5Mode(true); 

     $routeProvider.when('/',{ 
     templateUrl:'templates/users/login.html', 
     controller:'userController' 
     }); 

     $routeProvider.when('/dashboard',{ 
     templateUrl:'template/users/dashboard.html', 
     controller:'userController' 
     }); 

     $routeProvider.when('/logout',{ 
     templateUrl:'template/users/logout.html', 
     controller:'userController' 
     }); 

     $routeProvider.otherwise('/'); 
    } 

]); 
+0

Kannst du einen Plünderer postieren? – Srijith

Antwort

0

Es scheint, wie es Tippfehler in Modul Injektion von ngCookies statt ngCookie

var myApp = angular.module('myApp',['ngRoute', 'ngCookies']); 

Auch stellen Sie sicher, angular-route.js & angular-cookies.js geladen nach Winkel richtig ist.

+0

@Apurva hilft es? –

Verwandte Themen