0
をSVG、私は角度のjsを使用し、私のHTMLページにSVGを表示するように管理することはできません動的にロード: 私はこのコードを持っている: Directive.js:は私が動的にSVGをインポートしたい
angular.module ('SvgMapApp') directive ('svgMap', ['$ compile', function ($ compile) {
return {
restrict: 'A',
templateUrl: 'Scripts/widget.svg',
link: function (scope, element, attrs) {
}
}
}]);
SVGを.HTML:
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="FrontEnd/Styles.css">
<link rel="stylesheet" href="Scripts/bootstrap.min.js" />
</head>
<body ng-app="SvgApplication" ng-controller="svgController">
<h1> SVG widget</h1>
<div class="container">
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"></svg>
<div svg></div>
</div>
<script src="Scripts/Controller.js"></script>
<script src="Scripts/Directives.js"></script>
</body>
</html>
は、あなたのアイデアを持ってください
こんにちはすべて あなたはいいですか? – zanouti