Closed
Description
Currently, it seems impossible to use TypeScript type mapping for templateUrl
and even styleUrls
which is a bit odd since it seems to me that TypeScript should be resolving all paths?
Repro steps
- Add a path map to
tsconfig.json
compiler options:"paths": { "@core/*": ["core/*"] }
- Use a mapped path in a component's
templateUrl
property:templateUrl: '@core/forms/login-form.component.html'
ng serve --aot
Observed behavior
ERROR in : Couldn't resolve resource @core/forms/login-form.html' from /ng-cli/src/app/home/login-form.component.ts
Desired behavior
The TypeScript path mapping works as expected like everywhere else, and the templates are found and compiled.