Skip to content

Commit

Permalink
configured html5 routing
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Nov 5, 2012
1 parent 2375923 commit dd1c245
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/assets/javascripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

/* App Module */

angular.module('baw', []).
config(['$routeProvider', function($routeProvider) {
angular.module('baw', ['$routeProvider','$locationProvider'], function($routeProvider, $locationProvider ) {

// routes
$routeProvider.
when('/home', {templateUrl: 'assets/home.html', controller: HomeCtrl}).
when('/projects', {templateUrl: 'assets/project.html', controller: ProjectCtrl}).
when('/site', {templateUrl: 'assets/site.html', controller: SiteCtrl}).
//when('/phones/:phoneId', {templateUrl: 'partials/phone-detail.html', controller: PhoneDetailCtrl}).
otherwise({redirectTo: '/home'});
}]);

// location config
$locationProvider.html5Mode(true);

});

0 comments on commit dd1c245

Please sign in to comment.