feat(compiler): Add an implementation for XHR that uses a template cache 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).

Closes #7940
This commit is contained in:
Vikram Subramanian
2016-04-06 15:58:23 -07:00
committed by vikerman
parent 6cbf99086e
commit a596b887ff
9 changed files with 194 additions and 4 deletions

View File

@ -2,12 +2,15 @@ import {
TEST_BROWSER_STATIC_PLATFORM_PROVIDERS,
ADDITIONAL_TEST_BROWSER_PROVIDERS
} from 'angular2/platform/testing/browser_static';
import {BROWSER_APP_PROVIDERS} from 'angular2/platform/browser';
import {CONST_EXPR} from 'angular2/src/facade/lang';
/**
* Providers for using template cache to avoid actual XHR.
* Re-exported here so that tests import from a single place.
*/
export {CACHED_TEMPLATE_PROVIDER} from 'angular2/platform/browser';
/**
* Default patform providers for testing.
*/