feat(compiler): Add implementation for a XHR that uses a template cache to load template files.#7940
feat(compiler): Add implementation for a XHR that uses a template cache to load template files.#7940vikerman wants to merge 1 commit intoangular:masterfrom vikerman:cached_xhr
Conversation
|
cc @juliemr |
|
Is this just for testing? |
|
@laco0416 that's what the new compiller will do, will convert the templateUrl's in files intead of requesting them |
|
@ericmartinezr sounds good. thx! |
There was a problem hiding this comment.
Don't use window but the global variable exported from angular2/src/facade/lang.ts
…che to load template files. Useful for avoiding doing an actual XHR during testing. Part of the solution for #4051 (Other part is a Karma plugin that will create the template cache).
|
Merging PR #7940 on behalf of @alxhub to branch presubmit-alxhub-pr-7940. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Feature - Provide a XHR implementation that uses a template cache to avoid actually making an XHR. Exports CACHED_TEMPLATE_PROVIDER through angular2/platform/browser and angular2/platform/testing/browser which can be used by applications and tests to use the cached XHR implementation.
Support preloading of templates, at least for testing #4051
If the application or test uses the cached XHR implementation by setting up the provider for XHR it will use the template cache instead of making an actual XHR. This can be useful for writing fakeAsync tests.
No
Useful for avoiding doing an actual XHR during testing.
Part of the solution for #4051 (Other part is a Karma plugin that will create the template cache).