我有以下从 API 端点返回的 JSON
{
users: [
{
id: 3,
email: "example@gmail.com",
title: "Mr",
first_name: "Hi",
last_name: "Hey",
position: "Web Dev",
work_phone: "123456",
company: "Comp",
sign_in_count: 0,
last_sign_in_ip: null,
confirmed_at: null,
created_at: "2013-11-08T03:30:21.160Z",
roles: [
{
id: 2,
name: "booth_rep",
resource_id: null,
resource_type: null,
created_at: "2013-11-11T06:14:16.062Z",
updated_at: "2013-11-11T06:14:16.062Z"
}
]
}]
}
有没有办法将它与 Emberjs 和 Emberdata 一起使用来name
在我的users
车把模板中显示角色?
是否必须在模型中指定?