In my angular2 component, I am utilizing a third-party JavaScript library. The skin CSS of the component attempts to load images using relative URL paths. Since I am following a component-based architecture, I prefer to have all component dependencies encapsulated.
Unfortunately, when trying to implement this setup, the skins library is unable to locate the relative path images.
@Component({
moduleId: module.id,
selector: 'test',
templateUrl: 'test.html',
styleUrls: ['test.css', '../../external_lib/skins/skyblue.css'],
encapsulation:ViewEncapsulation.None
})
Is there a solution to achieve this? At the moment, the only workaround I have found is to include the CSS in the index.html file.