I am looking to update the Angular URL to /jobs/id. I have written the code below, but I'm unsure if it will work:
$location.path("/JobHire/jobs/"+response.data.id);
How should I set up the route configuration? Currently, I have it configured like this:
$routeProvider
.when('/jobs/:id',{
templateUrl:'partials/job.html'
})
.otherwise({
redirectTo:'/'
});
$locationProvider.html5Mode(true);
Is this the correct approach? And how can I retrieve those parameters inside a controller?