Including SVG template in Angularjs directive

后端 未结 5 1156
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 06:21
5条回答
  •  一整个雨季
    2020-11-30 06:48

    There is a templateNamespace property you can set to svg:

    module.directive('testrect', function() {
        return {
            restrict: 'E',
            templateNamespace: 'svg',
            template: '',
            replace: true
        };
    });
    

    Here is a link to the documentation.

提交回复
热议问题