Dynamic url routing with angularjs
问题 I have something like that in my code <ul ng-model="services"> <p ng-repeat="item in items"><b>{{ item.name }}</b> </p> I have for example 3 items: BMW, golf and mercedes I want to have an url with the name of each item, like /bmw or /mercedes and all url use details.html to show the details of the selected Item. I'm trying to understand how can I do this. 回答1: You can write a generic route like .when('/car/:carId', { templateUrl: 'some/path/details.html', controller: 'someCtrl' }) And then