I m actually facing a problem with routes in AngularJS. In fact, when I launch one of my page for the first time, the current url is "http://www.test.com/#/roadmaps/edit".
When I click on any button of the page, my page refreshes and gives me a new URL like : "http://www.test.com/?#/roadmaps/edit" with the "?" before the "#".
So everytime I fill the different input in my page and click a button, the first time it refreshes (problematic...) and make the "?" symbol appears in the URL.
Do you have an idea ?
This is my actual routing function:
function config($routeProvider) {
$routeProvider.
when('/roadmaps/edit', {
templateUrl: 'partials/roadmap_edit.html',
controller: 'RoadMapEditCtrl'
}).
when('/roadmaps/edit/:id', {
templateUrl: 'partials/roadmap_edit.html',
controller: 'RoadMapEditCtrl'
})
}
The first line is for adding a roadmap and the second one to modify.
Can you help me ?
Thanks for advance
EDIT :
This is one of the buttons that causes this problem :
<li>
<button style="margin-top:10px;" ng-click="selectAll()">Tout {{selectionner}}
</button>
</li>
And the selectAll() function :
var isSelectedJour = false;
$scope.selectAll = function () {
if (isSelectedJour) {
$scope.selectionner = "cocher";
} else {
$scope.selectionner = "décocher";
}
isSelectedJour = !isSelectedJour;
$scope.mo = isSelectedJour;
$scope.tu = isSelectedJour;
$scope.we = isSelectedJour;
$scope.th = isSelectedJour;
$scope.fr = isSelectedJour;
$scope.sa = isSelectedJour;
$scope.su = isSelectedJour;
};