I've been searching far and wide on the vast expanse of the internet, but I can't seem to find a solution to my perplexing query.
In my application, I have set up a route like so:
$routeProvider.when(
"/customer/:customerId", {
templateUrl: "/angular/components/booking-system/customers/templates/customer-template.html",
controller: "customersCtrl"
}
)
However, I'm at a loss as to how I can extract the customerId parameter within my customer-template.html. Can anyone offer some guidance on this? How can I access the parameter within my code?
When navigating to this route, I am using:
$scope.customerDetails = function(customerId) {
$location.url("/customer/" + customerId);
}
Is this the most effective method for navigation?