I'm building an app and i have a little problem.
For the index, i change my url with history.pushstate when i click on a button with jquery.
For example, www.mysite.com become www.mysite.com/something without reloading the page. But if a load this page i don't find www.mysite.com because "something" doesn't exist.
And I don't know how do the link between them.
I tried to do this but it doesn't work with AngularJS.
var myApp = angular.module('photo', ['ngRoute']);
myApp.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'machin.html'
});
$routeProvider.when('/something-one', {
templateUrl: 'machin.html'
});
$routeProvider.when('/something-two', {
templateUrl: 'machin.html'
});
$routeProvider.otherwise({ redirectTo: '/' });
}]);
This is the way to do it or I'm just lost ? ^^
Solved
My solution works sorry all. I forgot the script angular-route but the rest of my script works.