私は次のHTMLを持っています:
<div style="border:1px solid; height:300px; width:500px; position:relative; left:100px" id="canvas">
<tbox ng-repeat="tb in textBoxes" ng-model="tb">
</tbox>
</div>
そして、次の2つのディレクティブ
appModule.directive('resizable', function($compile, $document) {
return {
restrict: "A",
template: '<div ng-style="{top:tb.x, left:tb.y, height:tb.height, width:tb.width}" ng-transclude><span class="scale">s</span></div>',
transclude: true,
replace: true,
require: 'ngModel'
}
});
appModule.directive('tbox', function($document) {
return {
restrict: "E",
template: '<div class="editbox" resizable editoptions>{{tb.text}}</div>',
replace: true
}
});
angularが私を投げているという次のエラーは、正確にはどういう意味ですか?
Error: Multiple directives [tbox, resizable] asking for template on: <div class="editbox" resizable="" editoptions="" ng-repeat="tb in textBoxes" ng-model="tb">
http://jsfiddle.net/sEZM3/のjsfiddle