angular-docs-cn/modules
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
..
@angular feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
angular1_router fix(ngRouteShim): update anchors to function similar to angular 1.x (#8478) 2016-05-26 12:03:23 -07:00
benchmarks feat(benchpress): add custom user metric to benchpress 2016-06-16 07:30:53 -07:00
benchmarks_external repackaging: all the repackaging changes squashed 2016-05-01 20:51:00 -07:00
benchpress feat(benchpress): add custom user metric to benchpress 2016-06-16 07:30:53 -07:00
payload_tests/hello_world/ts repackaging: all the repackaging changes squashed 2016-05-01 20:51:00 -07:00
playground feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
rollup-test build: remove dependency on tsd and use @types/* instead 2016-05-25 16:42:28 -07:00
empty.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
es6-subset.d.ts chore(typings): restrict Angular to es5+collections+promise 2016-06-27 13:58:59 -07:00
tsconfig-ts2dart.json repackaging: all the repackaging changes squashed 2016-05-01 20:51:00 -07:00
tsconfig.json chore(typings): restrict Angular to es5+collections+promise 2016-06-27 13:58:59 -07:00
types.d.ts chore(typings): restrict Angular to es5+collections+promise 2016-06-27 13:58:59 -07:00
upgrade-ts2dart.d.ts repackaging: all the repackaging changes squashed 2016-05-01 20:51:00 -07:00
zone-ts2dart.d.ts repackaging: all the repackaging changes squashed 2016-05-01 20:51:00 -07:00