angular-docs-cn/modules/@angular
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
..
common bug(datePipe): passing "hh" to the datepipe (#9774) 2016-07-01 15:34:57 -07:00
compiler feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
compiler-cli feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
core feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
docs docs: update cheatsheet import lines (#9614) 2016-06-26 07:31:35 -07:00
examples feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
facade bug(datePipe): passing "hh" to the datepipe (#9774) 2016-07-01 15:34:57 -07:00
forms fix(forms): mark control containers as touched when child controls are touched (#9735) 2016-07-01 15:36:04 -07:00
http docs(security): security api doc update and fix stability marker for Type 2016-06-28 14:01:48 -07:00
platform-browser feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
platform-browser-dynamic feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
platform-server feat(browser): use AppModules for bootstrap in the browser 2016-07-02 20:35:09 -07:00
router fix(router): handle router outlets in ngIf 2016-06-30 22:14:42 -07:00
router-deprecated fix(common/testing): remove internal MockLocationStrategy from common/testing (#9562) 2016-06-24 12:41:57 -07:00
upgrade fix(upgrade): add peerDependency on platform-browser-dynamic (#9674) 2016-06-28 17:27:28 -07:00
README.dart.md repackaging: all the file moves 2016-05-01 20:51:00 -07:00
README.js.md repackaging: all the file moves 2016-05-01 20:51:00 -07:00
license-banner.txt chore(package.json): make the packages installable 2016-05-27 17:21:34 -07:00
package.json repackaging: all the file moves 2016-05-01 20:51:00 -07:00
pubspec.yaml repackaging: all the file moves 2016-05-01 20:51:00 -07:00

README.js.md

Angular2

The sources for this package are in the main Angular2 repo. Please file issues and pull requests against that repo. This is the repository for the upcoming 2.0 version. If you're looking for the current official version of Angular you should go to angular/angular.js

This package contains different sources for different users:

  1. The files located in the root folder can be consumed using CommonJS.
  2. The files under /es6 are es6 compatible files that can be transpiled to es5 using any transpiler. This contains:
    • dev/: a development version that includes runtime type assertions
    • prod/: a production version that does not include runtime type assertions
  3. The files under /ts are the TypeScript source files.

License: Apache MIT 2.0