angular-docs-cn/modules/@angular/compiler/test
Tobias Bosch 3f55aa609f feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:

```
@AppModule({
  modules: [BrowserModule],
  precompile: [MainComponent],
  providers: […], // additional providers
  directives: […], // additional platform directives
  pipes: […] // additional platform pipes
})
class MyModule {
  constructor(appRef: ApplicationRef) {
    appRef.bootstrap(MainComponent);
  }
}

// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);

// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```

The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.

Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
  public so that the offline compiler can resolve the token

BREAKING CHANGES:
- short form bootstrap does no longer allow
  to inject compiler internals (i.e. everything 
  from `@angular/compiler). Inject `Compiler` instead.
  To provide custom providers for the compiler,
  create a custom compiler via `browserCompiler({providers: [...]})`
  and pass that into the `bootstrap` method.
2016-07-02 20:35:09 -07:00
..
animation chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
expression_parser chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
i18n chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
output feat(core): introduce `@AppModule` 2016-06-30 11:34:40 -07:00
schema feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
compile_metadata_spec.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
css_lexer_spec.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
css_parser_spec.ts Revert "refactor(core): ensure CSS parser uses ParseSourceSpan to track ast locations" 2016-07-01 21:21:56 -07:00
css_visitor_spec.ts Revert "refactor(core): ensure CSS parser uses ParseSourceSpan to track ast locations" 2016-07-01 21:21:56 -07:00
directive_lifecycle_spec.dart repackaging: all the file moves 2016-05-01 20:51:00 -07:00
directive_lifecycle_spec.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
directive_normalizer_spec.ts feat(compiler): support sync runtime compile 2016-06-28 10:26:16 -07:00
directive_resolver_spec.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
html_ast_spec_utils.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
html_lexer_spec.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
html_parser_spec.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
metadata_resolver_fixture.dart repackaging: all the file moves 2016-05-01 20:51:00 -07:00
metadata_resolver_fixture.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
metadata_resolver_spec.ts feat(core): split ChangeDetectorStrategy into ChangeDetectionStrategy and ChangeDetectorStatus 2016-06-27 20:19:20 -07:00
runtime_compiler_spec.ts feat(core): introduce `@AppModule` 2016-06-30 11:34:40 -07:00
selector_spec.ts fix(platform-browser/testing): clean up public api for platform-browser/testing (#9519) 2016-06-23 16:42:25 -07:00
shadow_css_spec.ts fix(platform-browser/testing): clean up public api for platform-browser/testing (#9519) 2016-06-23 16:42:25 -07:00
spies.dart repackaging: all the file moves 2016-05-01 20:51:00 -07:00
spies.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
style_url_resolver_spec.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
template_parser_spec.ts feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
template_preparser_spec.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
test_bindings.ts chore(api): clean up compiler/testing api (#9520) 2016-06-23 15:52:18 -07:00
test_component_builder_spec.ts feat(compiler): support sync runtime compile 2016-06-28 10:26:16 -07:00
url_resolver_spec.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
view_resolver_mock_spec.ts feat(compiler): support sync runtime compile 2016-06-28 10:26:16 -07:00
view_resolver_spec.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
xhr_mock_spec.ts chore(api): clean up compiler/testing api (#9520) 2016-06-23 15:52:18 -07:00