added html5 pushstate support

This commit is contained in:
Enrico Fasoli 2015-04-01 19:58:23 +02:00
parent 696ef08beb
commit 06f5af5d8d
2 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,7 @@
{ {
"name": "pbsapp", "name": "pbsapp",
"root": "dist" "root": "dist",
"routes": {
"**": "index.html"
}
} }

View File

@ -1,8 +1,8 @@
pertApp = angular.module 'pertApp', ['ui.router'] pertApp = angular.module 'pertApp', ['ui.router']
pertApp.config ($stateProvider,$urlRouterProvider) -> pertApp.config ($stateProvider,$urlRouterProvider,$locationProvider) ->
$urlRouterProvider.otherwise '/' $urlRouterProvider.otherwise '/'
$locationProvider.html5Mode enabled: yes, requireBase: no
$stateProvider.state 'home', $stateProvider.state 'home',
url: '/' url: '/'
templateUrl: 'welcome.html' templateUrl: 'welcome.html'