17.1.0 • Published 10 months ago

nga-svg v17.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 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.

17.1.0

10 months ago

17.0.2

1 year ago

17.0.1

1 year ago

17.0.0

1 year ago

16.0.2

2 years ago

16.0.3

2 years ago

16.0.1

2 years ago

16.0.0

2 years ago