Я пытаюсь включить пример кода d3Plus (http://d3plus.org/examples/basic/32517cfde67270c99092/) в моем веб-приложении на основе angular.
Скелет кода:
angular.module('UI', ['UI.controllers', 'UI.directives']);
angular.module('d3Plus', ['d3']);
angular.module('d3', []);
angular.module('UI.controllers', []);
angular.module('UI.directives', ['d3Plus']);
angular.module('d3').factory('d3',[function(){
var d3;
d3=minimized/code/of/d3.js
return d3;
}]) ;
angular.module('d3Plus').factory('d3Plus',['d3', function(){
var d3Plus;
d3Plus=minimized/code/of/d3Plus.js
return d3Plus;
}]) ;
angular.module('UI.directives').directive('d3Bars', ['d3', function(d3) {....}])
angular.module('UI.directives').directive('d3plusMap', ['d3Plus', function(d3) {....}])
Ошибка: когда я пробую пользовательский тег (директива, созданная с помощью d3Plus), я получаю следующую ошибку в своей консоли: ReferenceError: d3 is not defined
в строке angular.js: 11496
Любая помощь?
Редактировать 1: тег на основе d3 — d3-bars работает нормально.