【发布时间】:2018-06-08 17:38:29
【问题描述】:
我是 Angular 1.6 组件架构的新手,遇到了一个简单的问题。我有一个 src 对象,其中有两个属性,即name 和age。
现在,我想要的是在 html 中绑定 name 属性。
The following is the code:
test.js:-
$ctrl.src = {
details: [
{ Id: 1, Name: "Test1", Address: "Add1" },
{ Id: 2, Name: "Test2", Address: "Add2" }
]
};
test.html:-
<cell-component>Hi {{Name}}</cell-component>
Expected Output:-
Hi test
【问题讨论】:
标签: javascript angularjs components angular1.6