Im currently switching my application to a Single Page Application. Im having some problems configuring my ngRoute. What I want is to send a ID to the templateUrl using ?id=.
How do I do that? This my code:
app.config(["$routeProvider", function($routeProvider) {
$routeProvider
.when('/testing/:id', {
templateUrl: 'templates/testing.php?id=:id'
});
}]);
It now passes ":id" as the value for ID. Which is obvious, but how do I make it send the ":id" passed in the URL?
For example:
/testing/45
Becomes:
app.config(["$routeProvider", function($routeProvider) {
$routeProvider
.when('/testing/45', {
templateUrl: 'templates/testing.php?id=45'
});
}]);