我有一个模式来显示一些用户信息,很像个人资料:
<!-- Modal -->
<div id="modalBoy-z" class="modal hide fade in" style="display: none; ">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>User Profile</h3>
</div>
<div ng-controller="">
<h3>Name: </h3>
<h3>Email: </h3>
<h3>Join Date: </h3>
<h3>Role: </h3>
<h3>Status: </h3>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Close</a>
</div>
这是用户信息的 JSON 对象:
{
"id": "8311...",
"meta": {
"created": 1355860257840,
"updated": 1355860257840
},
"profile": {
"id": "https://project.dev:0000/profiles/admin",
"type": "Profile",
"vocSlug": "admin",
"email": "admin@getsomething.com",
"label": "System Administrator",
"vocRole": [
"role_administrator",
"system_administrator",
"profile_administrator"
],
"Status": "active"
}
},
如何将 JSON 对象显示到模态 div 中?我的 ng-controller 会进入 div 吗?在过去的 3 周里,我一直在使用 AngularJS,并且仍然习惯了它的 MVC。