ich die folgende Tabelle haben:Angular Richtlinie funktioniert nicht auf dem Tisch
<table>
<thead>
<tr>
<th>Uno</th>
<th>Dos</th>
</tr>
</thead>
<!--directive template should be here-->
<double-rows></double-rows>
<!--/directive template should be here-->
</table>
Die Richtlinie wird definiert als:
angular.module('app', []);
angular.module('app').directive('doubleRows', function() {
return {
templateUrl: 'template.html',
restrict: 'E',
scope: {
row: '='
}
}
});
So einfach wie es aussieht, ist es machen nicht richtig. z:
<double-rows class="ng-isolate-scope">
Cell1
Cell2
</double-rows>
<table>
<thead>
<tr>
<th>Uno</th>
<th>Dos</th>
</tr>
</thead>
<!--directive template should be here-->
<!--/directive template should be here-->
</table>
Sie können den vollständigen Code in hier sehen: https://plnkr.co/edit/0Z65aK?p=preview
Wie es funktioniert?