我错过了什么?
app.directive('summaryAddress', [function () {
return {
scope: {
address: '=summary-address'
},
template: "<h2>Billing Address</h2>" +
"<span>{{address.flatNumber}}</span>"
};
}]);
输出只是......
{{address.flatNumber}}
答案 0 :(得分:0)
范围映射需要使用属性的规范化驼峰案例名称,而不是标记中显示的格式。
pobo.directive('summaryAddress', [function () {
return {
scope: {
address: '=summaryAddress'
},
template: "<h2>Billing Address</h2>" +
"<span>{{address.flatNumber}}</span>"
};
}]);