Posted By

aravindnair93 on 05/18/16


Tagged

angularjs


Versions (?)

Configuration for tagwise page Display - AngularJS


 / Published in: JavaScript
 

Config for Single page application

  1. .config(function ($routeProvider, $locationProvider) {
  2. $routeProvider
  3. .when("/", {
  4. templateUrl: 'template/initial.php',
  5. controller: 'mp3Ctrl'
  6. })
  7. .when("/Search/:searchTerm", {
  8. templateUrl: 'template/result.php',
  9. controller: 'searchCtrl'
  10. })
  11. .otherwise({redirectTo: ''});
  12.  
  13. $locationProvider.html5Mode(true); //For removing # from url
  14. })

Report this snippet  

You need to login to post a comment.