mdtrooper / angular-svg

A fork of https://www.npmjs.com/package/angular-svg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 :

  1. SvgCricle
  2. SvgText
  3. SvgRectangle
  4. SvgPolygon
  5. SvgPolyline
  6. SvgLine
  7. SvgEllipse
  8. 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

About

A fork of https://www.npmjs.com/package/angular-svg