I have made changes in my index.html and app.js.
This is app.js file.
angular
.module('assessmentApp', ['ngRoute', 'ngCookies', 'ngSanitize', 'timer', 'assets', 'youtube-embed'])
.config(config)
.run(run);
config.$inject = ['$routeProvider', '$locationProvider', '$httpProvider'];
function config($routeProvider, $locationProvider, $httpProvider) {
/*$locationProvider.html5Mode({
enabled: true,
requireBase: false
});*/
$routeProvider
.when('/', {
templateUrl: 'views/home.html',
controller: 'HomeController',
controllerAs: 'vm'
})
.when('/login', {
templateUrl: 'views/login.html',
controller: 'LoginController',
controllerAs: 'vm'
})
if(window.history && window.history.pushState){
$locationProvider.html5Mode({
enabled: true,
requireBase: true,
rewriteLinks: true
});
}
}
This is Index.html.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Assessment</title>
<meta name="description" content="">
<meta http-equiv=X-UA-Compatible content="IE=edge">
<meta name=viewport content="width=device-width,initial-scale=1">
<base href="/assessment/"></base>
</head>
</html>
- I have followed all the solution which is present related to my problem but still my app not working.
- I am using nginx server but I don't know is any changes requied or not? If yes then what change?
- I added html5 api and base tag and i removed all # from my app html file so my app is working fine but when I am going to reload my application it return page not found