##Install
tns plugin add nativescript-svg
###Usage
You use it in the same way you use Image source.
Android Library | iOS CocoaPod |
---|---|
pents90 svg-android | SVGKit by SVGKit |
there are limitations: saveToFile aren't working
var SVG = require("nativescript-svg");
var svgParser = new SVG.ImageSourceSVG();
var source = svgParser.imageFromResource('foxie');
var path = '//somepath/file.svg';
source = svgParser.loadFromFile(path);
var url = 'http://somepath/file.svg';
source = svgParser.loadFromUrl(url);
###Release note v1.0.9 -- load from URL on Android and IOS included.
v1.0.7 -- Fix svg.common override issue
v1.0.5 -- fix for npm package lib not including the .js files.
v1.0.2 -- the base64 encondig on Android included - IOS pending.