When I include style into component like this:
@Component({
styleUrls: [
"assets/plugins/test/css/style.css"
],
encapsulation: ViewEncapsulation.None
})
and when style contains references to images, for example
.sample { background-image: url(../img/bg.jpg); }
browser tries to find bg.jpg at base url (http://localhost/bg.jpg) instead of that, it should search for that image in "http://localhost/assets/plugins/test/img/".
That happens when Angular2 inserts style between style
tags. Is it possible to make Angular2 insert <link rel="stylesheet" href="..."/>
instead?
Update 1
Plunker: http://plnkr.co/edit/SHJzVHOyTuLu106r6tpD open browser developer console and search for "bg.jpg"