I have the following 2 routes in my file app.js, for some reason I don’t know when I try to go to /clients/new-invoiceI see the route and the pattern /clients/:clientID. The only way I can go to the correct page is to delete the route /clients/:clientID.
I also noticed that this only started after I added :clientIDto the next route.
Can someone please help me by telling me what exactly am I doing wrong here?
$routeProvider.when('/clients/:clientID',
{ templateUrl: 'templates/client-profile-view.html',
controller: 'ClientsController',
title: 'Client Profile',
data: {
auth: true,
plevel: [5]
}
});
$routeProvider.when('/clients/new-invoice',
{ templateUrl: 'templates/new-invoice.html',
controller: 'InvoicesController',
title: 'New Invoice',
data: {
auth: true,
plevel: [5]
}
});
Mchan source
share