Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. .config(['$routeProvider', '$locationProvider',
  2. function($routeProvider, $locationProvider) {
  3. $routeProvider.
  4. when('/', {
  5. templateUrl: "index.html"
  6. }).
  7. when('/profile/:id', {
  8. templateUrl: "profile.html",
  9. controller: 'UsersController as profiledUser'
  10. }).
  11. when('/gift/:id', {
  12. templateUrl: "gift.html",
  13. controller: 'GiftsController as profiledGift'
  14. }).
  15. when('/users-form', {
  16. templateUrl: "users-form.html",
  17. controller: 'UsersController as newUser'
  18. }).
  19. when('/login-form', {
  20. templateUrl: "login-form.html",
  21. controller: 'UsersController as loginUser'
  22. }).
  23. when('/gifts-form', {
  24. templateUrl: "gift-form.html",
  25. controller: 'GiftsController as newGift'
  26. }).
  27. when('/about', {
  28. templateUrl: "about.html"
  29. }).
  30. otherwise({
  31. redirectTo: '/'
  32. });
  33.  
  34. <a href="#profile/5" data-ng-click="template=1" style="color: white;">Profile</a>
  35.  
  36. <li><a href="#profile/{{id}}" data-ng-click="template=1" style="color: white;">Profile</a></li>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement