location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php break;
}
}
app.config(function ($routeProvider) {
$routeProvider
.when('/account', {
template: '<div>It works</div>'
})
.when('/users/:id', {
template: '<div>It works too</div>'
})
.otherwise({
template: '<div>404</div>',
});
});