Skip to content

AngularJS directive for detecting SVG support and providing a PNG fallback for unsupported browsers.

Notifications You must be signed in to change notification settings

tinacious/angular-svg-png

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SVG to PNG fallback in AngularJS

This Angular directive will automatically replace the file extension *.svg with *.png for browsers that do not support SVG.

Modernizr is a dependency for SVG support detection.

Usage

You can install angular-svg-png and its dependency (Modernizr) as well as inject it in your project using the following command:

bower install angular-svg-png --save
grunt bower-install

After install, add svgPng to your app's dependencies.

The screenshot below shows an SVG image being swapped out for a PNG.

About

AngularJS directive for detecting SVG support and providing a PNG fallback for unsupported browsers.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published