我有表格和模板指令rnRow
<table>
<tr><td><span class="text-primary ">0 :</span></td><td><span class="text-default "> 3</span></td></tr>
<rn-Row ng-Fieldcaption="<" ng-Fieldvalue=">"></rn-Row>
<rn-Row ng-Fieldcaption="-" ng-Fieldvalue="+"></rn-Row>
<rn-Row ng-Fieldcaption="Left" ng-Fieldvalue="Right"></rn-Row>
<tr><td><span class="text-primary ">1 :</span></td><td><span class="text-default "> 2</span></td></tr>
</table>
template: '<tr><td><span >{{ngFieldcaption}} :</span></td><td><span> {{ngFieldvalue}}</span></td></tr>'
和结果
但我希望看到
我做错了什么?
答案 0 :(得分:1)
在这种情况下,我会使用属性声明
<body ng-app="demo">
<table>
<tr><td><span class="text-primary ">0 :</span></td><td><span class="text-default "> 3</span></td></tr>
<tr rn-Row ng-Fieldcaption="<" ng-Fieldvalue=">"></tr>
<tr rn-Row ng-Fieldcaption="-" ng-Fieldvalue="+"></tr>
<tr rn-Row ng-Fieldcaption="Left" ng-Fieldvalue="Right"></tr>
<tr><td><span class="text-primary ">1 :</span></td><td><span class="text-default "> 2</span></td></tr>
</table>
</body>