These are chat archives for angular/material

May 2016
Shaun O'Brien
May 14 2016 20:34
I previously had a file where .svg assets were imported using ES2015 import syntax, e.g., import './ic_some_icon.svg';, and then I was using$iconProvider` to make them available to my app....
So the webpack loader was getting the path, and then this code would add things later: icons.forEach(icon => $mdIconProvider.icon(, icon.asset));
However, I'm now switching to a Gulp/Browserify build (not my decision) and the two svg transforms I've tried real quick and this is how they work:import someIcon from './ic_some_icon.svg'; turns someIcon into a string containing the markup from the .svg file.
But $iconProvider expects a path and will do the loading later.. Is there a way to add the raw svg as a named icon so I don't have to edit many files?
I know there's the template cache.. I suppose I could refactor that one file and pull in the template cache. Hoping there's a better way as I'm not currently using the template cache service. (I'm importing html templates using import syntax in the .js files.)
Shaun O'Brien
May 14 2016 20:39
SHORT VERSION: Can you register an SVG using using raw SVG markup rather than a path to a file?