I'm trying to create a very simple Angular JS directive which simply replaces an tag with an SVG icon which will differ depending on the name attribute. So this...
<icon name="plus" />
might be replaced with this.....
<SVG version="1.1"><path>...</path></SVG>
Because all basically going to be a simple switch statement followed by an element.replaceWith(), it doesn't require any $scope, or anything like that. In fact once it's been compiled I'd rather Angular forgot about it completely and reduced any memory wastage etc.
My reason for this is that I've read about a maximum limit on Angular directives on a page and I'm going to be using a lot of icons so want to reduce wastage.
So basically my question is how to do this as efficiently as possible, or should I not be worried?
Many thanks.