javascript - Angular router is not working but there is no errors aswell -


i new angularjs. have 2 router files auth_router.js , teacher_router.js. auth_router.js working fine teacher_router.js not working. code below:

app.js file

angular.module("learn_mart", ['ngroute', 'ngcookies'])     .run(function($rootscope, $cookies) {         $rootscope.baseurl = "http://localhost/lm/auth.html#";          $rootscope.userrole = $cookies.get('userrolecookie');         $rootscope.activetab = $cookies.get('activetabcookie');           $rootscope.redirectologin = function(role) {             $cookies.put('activetabcookie', 1);             $cookies.put('userrolecookie', role);              window.location = $rootscope.baseurl + '/' + role + "_login";         };     }); 

auth_router.js file

angular.module("learn_mart")     .config(function($routeprovider) {         $routeprovider             .when("/sub_login", {                 controller: "subscriber_login",                 templateurl: 'views/auth/subscriber_login.html'             })             .when("/sub_register", {                 controller: "subscriber_registration",                 templateurl: 'views/auth/subscriber_registration.html'             })             .when("/tech_login", {                 controller: "teacher_login",                 templateurl: 'views/auth/teacher_login.html'             })             .when("/tech_register", {                 controller: "teacher_registration",                 templateurl: 'views/auth/teacher_registration.html'             })             .when("/shop_login", {                 controller: "shop_login",                 templateurl: 'views/auth/shop_login.html'             })             .when("/shop_register", {                 controller: "shop_registration",                 templateurl: 'views/auth/shop_registration.html'             })     }); 

teacher_router.js

angular.module("learn_mart")     .config(function($routeprovider) {         $routeprovider             .when("/teacher_course", {                 controller: "show_courses_teacher",                 templateurl: "views/auth/shop_login.html"             })     }); 

there no issue's file inclution. there no errors shown in developer console.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -