Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-svg-icons

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-svg-icons

Angular component to display icons from SVG sprites

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

angular-svg-icons

npm version

Setup

Install the package from NPM

npm install angular-svg-icons

Add the script to the HTML

<script src="node_modules/angular-svg-icons/dist/angular-svg-icons.js"></script>

Add angular-svg-icons dependency to your module

angular.module('app', ['angular-svg-icons']);

Configure the component with the path of the svg sprites file and the folder of individual svg

angular.module('app').config(['$svgIconProvider', function($svgIconProvider){
  $svgIconProvider.spritesFile('symbol/svg/sprite.css.svg');
}]);

Use the component in the HTML

<svg-icon name="'star'" height="20" width="20"></svg-icon>

Add the CSS

<link rel="stylesheet" href="node_modules/angular-svg-icons/dist/angular-svg-icons.css">

You can also import the SCSS file from the src folder.

Generate the SVG sprites

TODO

Configuration

TODO

Browsers support

ChromeFirefoxIEEdgeOperaSafari
Latest ✔Latest ✔9+ with fallback12 with fallback, 13+ ✔Latest ✔6+ ✔

The fallback consists of an AJAX call to the svg and an inline display of the svg sprite.

Keywords

FAQs

Package last updated on 21 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc