Here is mine controller:
app.controller('UserListCtrl', function($scope, UsersResource){
$scope.users = UsersResource.query();
});
This is my page (written in Jade)
li(ng-repeat="user in users")
a.button(href='/user/{{ user.id }}') View Profile
The problem is that I want to have for each user unique id without having to declare it in database (MongoDB) and when I click on that user , I want it to be passed on the next page (/user/uniqueId) and show information about the user (user.firstName and user.lastName)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.