Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@angular/cli): all styleUrls and templateUrl are relative #5442

Merged
merged 1 commit into from
Mar 17, 2017

Conversation

hansl
Copy link
Contributor

@hansl hansl commented Mar 15, 2017

Fixes #5056.

@hansl hansl requested a review from filipesilva March 15, 2017 18:45
@hansl
Copy link
Contributor Author

hansl commented Mar 15, 2017

This is a follow up of #3842 which should have fixed it but still relied on web pack's resolution.

// if string, assume relative path unless it start with /
return `'${loaderUtils.urlToRequest((element as ts.StringLiteral).text, '')}'`;
const url = (element as ts.StringLiteral).text;
if (url[0] == '.') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to check for ./, since it is valid to have a filename starting with ..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

That'd be a check for ./ or ../ then

@hansl hansl force-pushed the fix-template-url branch from f2ff1a4 to 42f5761 Compare March 16, 2017 23:23
@hansl hansl force-pushed the fix-template-url branch from 42f5761 to 1fab08d Compare March 16, 2017 23:35
@hansl hansl merged commit 9b52253 into angular:master Mar 17, 2017
@hansl hansl deleted the fix-template-url branch November 28, 2018 23:34
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module path prefix is not used to resolve styleUrl or templateUrl with AoT
4 participants