Skip to content

fix(ComponentUrlMapper): support relative template URLs in Dartium - #3743

Closed
kegluneq wants to merge 1 commit into
angular:masterfrom
kegluneq:component_url_mapper
Closed

kegluneq wants to merge 1 commit into
angular:masterfrom
kegluneq:component_url_mapper

Conversation

@kegluneq

Copy link
Copy Markdown

@tbosch , what do you think of this approach, adapted from munificent's #2827? I believe it solves the same problem but without the need for a dedicated transformer.

When running in Dartium without using transformers (i.e. with a normal
static web server), handle relative template URLs. This works by using
mirrors to get the URL of the library where the component class is
defined.

Closes #2771

@kegluneq kegluneq added feature Label used to distinguish feature request from other issues action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 20, 2015
@kegluneq
kegluneq force-pushed the component_url_mapper branch from 583f471 to 04342ce Compare August 20, 2015 16:45
@tbosch

tbosch commented Aug 25, 2015

Copy link
Copy Markdown
Contributor

@kegluneq this sound good. How would it work with transformers?

@kegluneq

Copy link
Copy Markdown
Author

Good question! Right now this is a non-issue for templateUrl since we inline the template wherever possible, but I know this will be used in other places so needs to be considered there too. I imagine that means storing the component url somewhere.

Does this fall out of the compile pipeline refactor using typeImportPath? If so, maybe this should wait for that change.

@kegluneq
kegluneq force-pushed the component_url_mapper branch from 04342ce to ed09724 Compare August 26, 2015 17:03
@tbosch

tbosch commented Aug 27, 2015

Copy link
Copy Markdown
Contributor

Yes, the compiler refactor will actually do this automatically...

On Tue, Aug 25, 2015 at 4:07 PM Timothy Blasi [email protected]
wrote:

Good question! Right now this is a non-issue for templateUrl since we
inline the template wherever possible, but I know this will be used in
other places so needs to be considered there too. I imagine that means
storing the component url somewhere.

Does this fall out of the compile pipeline refactor
https://docs.google.com/document/d/1iVcmAaONB2ztA5GElL9pOkqcU4Gi5LNJDA0Yyp19AQA/edit#heading=h.rjublbfw3tme
using typeImportPath? If so, maybe this should wait for that change.

—
Reply to this email directly or view it on GitHub
#3743 (comment).

When running in Dartium without using transformers (i.e. with a normal
static web server), handle relative template URLs. This works by using
mirrors to get the URL of the library where the component class is
defined.

Closes angular#2771
@kegluneq
kegluneq force-pushed the component_url_mapper branch from ed09724 to 9f9cb47 Compare August 31, 2015 23:24
@kegluneq

kegluneq commented Sep 1, 2015

Copy link
Copy Markdown
Author

@tbosch Travis is happy, so now I'm happy committing this for now. It's equivalent in the transformed case and better in the Dartium case, so seems like it's an overall win, even if not perfect.

WDYT?

@mary-poppins

Copy link
Copy Markdown

Merging PR #3743 on behalf of @tbosch to branch presubmit-tbosch-pr-3743.

@tbosch tbosch added pr_state: LGTM action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 1, 2015
@mary-poppins mary-poppins removed the action: merge The PR is ready for merge by the caretaker label Sep 1, 2015
@kegluneq kegluneq closed this in 7c7888d Sep 1, 2015
@kegluneq
kegluneq deleted the component_url_mapper branch September 2, 2015 00:23
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes feature Label used to distinguish feature request from other issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support relative urls in dart

5 participants