16.0.3 • Published 3 months ago

nga-svg v16.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

ngaSvg

ngaSvg is an Angular library that provides a directive to show svg content.

npm version GitHub issues GitHub stars GitHub license

Installation

To install ngaSvg, run the following command in your terminal:

npm install nga-svg --save

Usage

<div [ngaSvg]="svgString"></div>
export class MyComponent {
  // ...
  svgString: '<svg> .... </svg>';
  // ...
}

or use catch:

import { SvgService } from 'nga-svg';

export class MyComponent {
  svgService = inject(SvgService);

  // ...
  ngOnInit(): void {
    this.svgService.addSVG('name', '<svg> .... </svg>');
  }
  // ...
}
<div ngaSvg svgName="name"></div>

or use input and catch

<div [ngaSvg]="svgString" svgName="test"></div>
export class MyComponent {
  // ...
  svgString: '<svg> .... </svg>';
  // ...
}

Contributing

We welcome contributions to ngaSvg. Please feel free to create an issue or pull request on GitHub.

License

ngaSvg is licensed under the MIT License.

16.0.2

3 months ago

16.0.3

3 months ago

16.0.1

6 months ago

16.0.0

6 months ago