我是angularjs的新手
我想在 html 上使用 $resource whitch 重复获取数据
但有错误显示
“预期 ngRepeat 以‘集合中的项目’的形式出现,但得到了‘用户’”
代码
<dd ng-repeat= user in User.users>
<input type="radio" value= "{{user.user.userId}}" />
{{user.user.userUsername}}
</dd>
$scope.User= {'user': userService.query()};
请帮忙
返回数据
User: {
user:
[ {
userId: 1
userName: User1
userUsername: user1
userPassword: 123456
userSex: male
userBirthday: 1999-01-01
userStatus: 1
roleId: 1
roleModel: { }
} ,
{
userId: 2
userName: User2
userUsername: user2
userPassword: 123456
userSex: female
userBirthday: 1888-01-01
userStatus: 1
roleId: 1
roleModel: { }
} ]
}