/ Published in: JavaScript
Config for Single page application
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
.config(function ($routeProvider, $locationProvider) { $routeProvider .when("/", { templateUrl: 'template/initial.php', controller: 'mp3Ctrl' }) .when("/Search/:searchTerm", { templateUrl: 'template/result.php', controller: 'searchCtrl' }) .otherwise({redirectTo: ''}); $locationProvider.html5Mode(true); //For removing # from url })