ncuillery / angular-breadcrumb

Generate a breadcrumb from ui-router's states
http://ncuillery.github.io/angular-breadcrumb/
MIT License
785 stars 183 forks source link

ng-include of svg not woring #87

Closed bodagetta closed 9 years ago

bodagetta commented 9 years ago

I'm able to use SVGs in labels like this

.state('statename', {
    url; '/myurl',
    ncyBreadcrumb: {
        label: '<img src="/assets/icon.svg' />{{labelText}}'
    }
})

and all looks well, but I want to be able to style the SVGs, so I need to include them inline.

When I try to use them inline, like this

.state('statename', {
    url; '/myurl',
    ncyBreadcrumb: {
        label: '<span ng-include="/assets/icon.svg"></span>{{labelText}}'
    }
})

it doesn't render the SVG.

ncuillery commented 9 years ago

This syntax <span ng-include="/assets/icon.svg"></span> doesn't work, in the breadcrumb or not (plain angular template).

You can see it in this plunker. You can see also a working example of SVG in a breadcrumb label (click on "Element 1").

Greyhaven7 commented 9 years ago

I know it's been a while, but the plunker you linked is broken again. It's not displaying any labels, only a couple "/" separators with empty space between them.

douglogsdon commented 9 years ago

The ngSanitize module is required when binding to html within the template: forked plunker AngularJS ngSanitize AngularJS ngBindHtml