File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Angular svg base fix
2
2
3
3
A small directive for fixing SVG `` xlink:href `` within a document with a base tag
4
+ Description of the problem — [ #8934 ] ( https://github.com/angular/angular.js/issues/8934 )
4
5
5
6
### Installation
6
7
@@ -18,16 +19,20 @@ bower install angular-svg-base-fix
18
19
19
20
### How to use
20
21
22
+ Just add this module to your angular app module declaration
23
+
21
24
``` javascript
22
25
angular
23
- .module ( ' myApp' , [' svgBaseFix' ] )
24
- .config ( function ($locationProvider ) {
26
+ .module (' myApp' , [' svgBaseFix' ])
27
+ .config (function ($locationProvider ) {
25
28
$locationProvider .html5Mode (true );
26
29
});
27
30
```
28
31
32
+ Use svg like you normally would:
33
+
29
34
``` html
30
35
<svg >
31
- <use svg-base-fix xlink:href =" #icon-name" ></use >
36
+ <use xlink:href =" #icon-name" ></use >
32
37
</svg >
33
38
```
You can’t perform that action at this time.
0 commit comments