https://github.com/tinacious/angular-svg-png
AngularJS directive for detecting SVG support and providing a PNG fallback for unsupported browsers.
https://github.com/tinacious/angular-svg-png
a11y accessibility angularjs ie ie7 ie8 ie9 responsive-web-design
Last synced: 7 months ago
JSON representation
AngularJS directive for detecting SVG support and providing a PNG fallback for unsupported browsers.
- Host: GitHub
- URL: https://github.com/tinacious/angular-svg-png
- Owner: tinacious
- Created: 2014-03-29T00:11:54.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-13T00:29:10.000Z (almost 11 years ago)
- Last Synced: 2025-02-21T02:08:19.001Z (8 months ago)
- Topics: a11y, accessibility, angularjs, ie, ie7, ie8, ie9, responsive-web-design
- Homepage:
- Size: 273 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 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:
```bash
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.
