I\'m trying to re-use a portion of my HTML view in multiple places. The portion I want to re-use is table cells in an HTML table. The problem is that my custom directive i
Apply the directive to like this: app.directive('myElement', function () { return { restrict: 'A', scope:{ ngModel: '=blah' }, template: 'Name: {{ ngModel.name }}Age: {{ ngModel.age }}' } }); Working Demo 0 讨论(0) 查看其它3个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
like this: app.directive('myElement', function () { return { restrict: 'A', scope:{ ngModel: '=blah' }, template: 'Name: {{ ngModel.name }}Age: {{ ngModel.age }}' } }); Working Demo 0 讨论(0) 查看其它3个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
app.directive('myElement', function () { return { restrict: 'A', scope:{ ngModel: '=blah' }, template: 'Name: {{ ngModel.name }}Age: {{ ngModel.age }}' } });
Working Demo