Angular-svg
It is a fork of original (without git/cvs/hg/fossil repository) from angular-svg in npm .
This readme is working progress (put the oldie gif) .
TO-DO
- Now it working only for angular7. Maybe it is good that it working with a near or last version of angular.
Original author
- kata.yaswanth
Old
SetUp
npm install angular-svg
Usage
import { SvgCircleModule, SvgLineModule, SvgPolygonModule, SvgPolylineModule, SvgTextModule, SvgPathModule } from 'angular-svg'
#Modules List :
- SvgCricle
- SvgText
- SvgRectangle
- SvgPolygon
- SvgPolyline
- SvgLine
- SvgEllipse
- SvgPath
In Html
Add a root svg tag in your html
//Your root svg tag here
// for circle
<g svg-circle [circle]="circle" (circleMousedown)="onCircleClick($event)">
// for line
<g svg-line [line]="line" (lineMousedown)="onLineClick($event)">
//for polygon <g svg-polygon [polygon]="polygon" (polygonMousedown)="onPolygonClick($event)">
// for polyline
<g svg-polyline [polyline]="polyline">
//for svg path
<g svg-path [path]="pathString" [stroke]="colorstroke">
// for svg text
<g svg-text [text]="text">test
// Svg end tag