Guest User

angularRouting

a guest
Sep 2nd, 2015
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     app.config(function($routeProvider, $locationProvider) {
  2.       $routeProvider
  3.        .when('/login', {
  4.         templateUrl: 'templates/login.html',
  5.         controller: 'LoginController',
  6.       })
  7.        .when('/index', {
  8.         templateUrl: 'templates/glowna.html',
  9.         controller: 'IndexController',
  10.       })
  11.       .when('/roomGroupAdd', {
  12.         templateUrl: 'templates/grupy.html',
  13.         controller: 'roomGroupAddController',
  14.       })
  15.       .when('/rezerwacje', {
  16.         templateUrl: 'templates/rezerwacje.html',
  17.         controller: 'ReservationController',
  18.       })
  19.       .otherwise({
  20.         redirectTo: '/login'
  21.       });
  22.        $locationProvider.html5Mode(true);
  23.     });
Advertisement
Add Comment
Please, Sign In to add comment