app.config(function($routeProvider)
{
$routeProvider.when('/project/:id',{
templateUrl: 'project',
controller:'projectController'
});});
I want to pass the id to templateUrl, which means that the actual access is 'project/id'. Is there a way to do it? Because at this time, a request is made to the background action based on the ID. Novice please give me advice.
Okay, I just looked at the API and tested it. It can be written directly as a function.