Seeking advice on the best way to reference templateUrl
in a commonly used npm module. I want to avoid including node_modules
in the path, as the directory could potentially be renamed. Is there an alternative method that still works effectively?
For example:
"npm:my-commons-ts/my-commons/components/BootstrapAlert/BootstrapAlert.html"
@Component({
selector: "bs-alert",
templateUrl: "node_modules/my-commons-ts/my-commons/components/BootstrapAlert/BootstrapAlert.html",
})
export class BootstrapAlertComponent {
public errors: DisplayMessage[] = [];
public successes: DisplayMessage[] = [];
public warnings: DisplayMessage[] = [];
public infos: DisplayMessage[] = [];
@Input()
public bcn: string = null;
...
}
Currently using systemjs
for module loading.