0
Я пытаюсь использовать OpenLayers-директиву внутри директивы:Используйте OpenLayers директиву внутри директивы
var app = angular.module("demoapp", ["openlayers-directive"]);
app.directive('myDir', function() {
return {
restrict: "E",
replace: true,
template: "<openlayers ol-center='center' height='480px' width='640px'></openlayers>"
}
})
В HTML:
<my-dir></my-dir>
Но когда я делаю это, я мульти-Dir ошибка
VM2731 angular.js:12221 Error: [$compile:multidir] Multiple directives [myDir, openlayers] asking for template on: <openlayers ol-center="center" height="480px" width="640px">
Любое объяснение будет полезно
Спасибо!
Вот шаблон в fiddle