diff --git a/.gitignore b/.gitignore
index ca56e9487ae22..01c9c49e5a208 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,6 +31,8 @@ pubspec.lock
.idea/
*.swo
modules/.settings
+.vscode
+modules/.vscode
# Don't check in secret files
*secret.js
@@ -39,3 +41,6 @@ modules/.settings
npm-debug.log
/docs/bower_components/
+
+# build-analytics
+.build-analytics
diff --git a/.travis.yml b/.travis.yml
index 428b8ed1be990..32de2bd40b223 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: node_js
sudo: false
node_js:
-- '0.12'
+- '4.1.1'
branches:
except:
@@ -20,6 +20,8 @@ env:
- SAUCE_USERNAME=angular-ci
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
- ARCH=linux-x64
+ - DART_DEV_VERSION=latest
+ - DART_STABLE_VERSION=latest
# Token for tsd to increase github rate limit
# See https://github.com/DefinitelyTyped/tsd#tsdrc
# This does not use http://docs.travis-ci.com/user/environment-variables/#Secure-Variables
@@ -31,16 +33,18 @@ env:
- secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
matrix:
# Order: slowest build on top, so that we don't hog VMs while waiting for others to complete.
- - MODE=dart DART_CHANNEL=stable
- - MODE=dart DART_CHANNEL=dev
- - MODE=saucelabs DART_CHANNEL=dev
- - MODE=dart_experimental DART_CHANNEL=dev
- - MODE=js DART_CHANNEL=dev
- - MODE=lint DART_CHANNEL=dev
+ - MODE=dart DART_CHANNEL=stable DART_VERSION=$DART_STABLE_VERSION
+ - MODE=dart DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
+ - MODE=saucelabs DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
+ - MODE=dart_experimental DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
+ - MODE=js DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
+ - MODE=router DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
+ - MODE=lint DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
matrix:
allow_failures:
- - env: "MODE=saucelabs DART_CHANNEL=dev"
+ - env: "MODE=saucelabs DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION"
+ - env: "MODE=dart_experimental DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION"
addons:
firefox: "38.0"
@@ -50,13 +54,14 @@ before_install:
- export DISPLAY=:99.0
- export GIT_SHA=$(git rev-parse HEAD)
- ./scripts/ci/init_android.sh
-- ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${ARCH}
+- ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${DART_VERSION} ${ARCH}
- sh -e /etc/init.d/xvfb start
- if [[ -e SKIP_TRAVIS_TESTS ]]; then { cat SKIP_TRAVIS_TESTS ; exit 0; } fi
+- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && SAUCE_USERNAME="angular2-ci" && SAUCE_ACCESS_KEY="693ebc16208a-0b5b-1614-8d66-a2662f4e" || true'
install:
# Update npm
- - npm install -g npm@2.9.1
+ - npm install -g npm@2.14.5
- npm --version
# Check the size of caches
- du -sh ./node_modules || true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1bac41c26bd28..b7f5f35a8230c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,589 @@
+
+# 2.0.0-alpha.44 (2015-10-15)
+
+
+### Bug Fixes
+
+* **compiler:** attribute case in IE9 ([b89c5bc](https://github.com/angular/angular/commit/b89c5bc)), closes [#4743](https://github.com/angular/angular/issues/4743)
+* **compiler:** explicitly support event bindings also on `` elements ([cec8b58](https://github.com/angular/angular/commit/cec8b58)), closes [#4712](https://github.com/angular/angular/issues/4712)
+* **dart/transform:** Handle empty .ng_deps.dart files ([5a50597](https://github.com/angular/angular/commit/5a50597))
+* **dart/transform:** Parse directives agnostic of annotation order ([efddc90](https://github.com/angular/angular/commit/efddc90))
+* **forms:** emit value changes after errors and status are set ([b716d23](https://github.com/angular/angular/commit/b716d23)), closes [#4714](https://github.com/angular/angular/issues/4714)
+* **style_compiler:** don’t resolve absolute urls that start with a `/` during compilation ([a941fb0](https://github.com/angular/angular/commit/a941fb0)), closes [#4763](https://github.com/angular/angular/issues/4763)
+* **style_compiler:** don’t touch urls in stylesheets and keep stylesheets with absolute urls in templ ([7dde18b](https://github.com/angular/angular/commit/7dde18b)), closes [#4740](https://github.com/angular/angular/issues/4740)
+* **testing:** let DOM adapter dictate XHR implementation for tests ([d7ab5d4](https://github.com/angular/angular/commit/d7ab5d4))
+* **transformers:** show nice error message when an invalid uri is found ([6436f96](https://github.com/angular/angular/commit/6436f96)), closes [#4731](https://github.com/angular/angular/issues/4731)
+
+### Features
+
+* **forms:** add input[type=number] value accessor ([65c737f](https://github.com/angular/angular/commit/65c737f)), closes [#4014](https://github.com/angular/angular/issues/4014) [#4761](https://github.com/angular/angular/issues/4761)
+* **ngUpgrade:** add support for upgrade/downgrade of injectables ([d896e43](https://github.com/angular/angular/commit/d896e43)), closes [#4766](https://github.com/angular/angular/issues/4766)
+* **ngUpgrade:** faster ng2->ng1 adapter by only compiling ng1 once ([053b7a5](https://github.com/angular/angular/commit/053b7a5))
+* **query:** add filter and reduce to QueryList ([bfbf18d](https://github.com/angular/angular/commit/bfbf18d)), closes [#4710](https://github.com/angular/angular/issues/4710)
+
+
+# 2.0.0-alpha.42 (2015-10-13)
+
+This is a quick follow-up release to 41 to fix the d.ts distribution with our
+npm package. See #4706 for more info.
+
+### Bug Fixes
+
+* **build:** Fix serve.js.dev to build bundles ([3b03660](https://github.com/angular/angular/commit/3b03660)), closes [#4700](https://github.com/angular/angular/issues/4700)
+* **docs:** minor @link fixes. ([3a801c1](https://github.com/angular/angular/commit/3a801c1)), closes [#4696](https://github.com/angular/angular/issues/4696)
+* **publish:** emit type declarations with CJS build ([57649d1](https://github.com/angular/angular/commit/57649d1)), closes [#4706](https://github.com/angular/angular/issues/4706) [#4708](https://github.com/angular/angular/issues/4708)
+* **test:** command compiler attr merge test in IE ([e15e242](https://github.com/angular/angular/commit/e15e242))
+
+### Features
+
+* **build:** add tasks to watch and recompile js and dart ([50e922f](https://github.com/angular/angular/commit/50e922f))
+* **forms:** add minlength and maxlength validators ([e82a35d](https://github.com/angular/angular/commit/e82a35d)), closes [#4705](https://github.com/angular/angular/issues/4705)
+
+### BREAKING CHANGES
+
+- TypeScript typings are now included in the distribution. If you have installed external typings
+ (eg. using tsd to fetch files from DefinitelyTyped), you need to remove them. TypeScript will give
+ a `Duplicate identifier` error if the same type definition appears twice.
+
+
+# 2.0.0-alpha.41 (2015-10-13)
+
+
+### Bug Fixes
+
+* **compiler:** merge `class` and `style` attributes from the element with the host attributes ([eacc8e3](https://github.com/angular/angular/commit/eacc8e3)), closes [#4583](https://github.com/angular/angular/issues/4583) [#4680](https://github.com/angular/angular/issues/4680)
+* **compiler:** shadow CSS @import test in some browsers ([0def28e](https://github.com/angular/angular/commit/0def28e)), closes [#4629](https://github.com/angular/angular/issues/4629)
+* **docs:** Updated docs for default router location strategy ([075011f](https://github.com/angular/angular/commit/075011f)), closes [#4517](https://github.com/angular/angular/issues/4517)
+* **router:** properly read and serialize query params ([8bc40d3](https://github.com/angular/angular/commit/8bc40d3)), closes [#3957](https://github.com/angular/angular/issues/3957) [#4225](https://github.com/angular/angular/issues/4225) [#3784](https://github.com/angular/angular/issues/3784)
+* **test_lib:** don't mock out XHR via MockXHR by default in tests ([6abed8d](https://github.com/angular/angular/commit/6abed8d)), closes [#4539](https://github.com/angular/angular/issues/4539) [#4682](https://github.com/angular/angular/issues/4682)
+* **typings:** add more missing typings. ([aab0c57](https://github.com/angular/angular/commit/aab0c57)), closes [#4636](https://github.com/angular/angular/issues/4636)
+* **typings:** fix typings which were previously unchecked ([c178ad4](https://github.com/angular/angular/commit/c178ad4)), closes [#4625](https://github.com/angular/angular/issues/4625)
+* **typings:** missing types in ListWrapper typings ([597f79e](https://github.com/angular/angular/commit/597f79e))
+
+### Features
+
+* **typings**: `*.d.ts` files are now bundled with npm package, `tsd link` or `tsd install` no longer needed ([95f9846](https://github.com/angular/angular/commit/95f9846))
+* **core:** desugar [()] to [prop] and (prop-change) ([7c6130c](https://github.com/angular/angular/commit/7c6130c)), closes [#4658](https://github.com/angular/angular/issues/4658)
+* **di:** change the params of Provider and provide to start with "use" ([1aeafd3](https://github.com/angular/angular/commit/1aeafd3)), closes [#4684](https://github.com/angular/angular/issues/4684)
+* **di:** rename Binding into Provider ([1eb0162](https://github.com/angular/angular/commit/1eb0162)), closes [#4416](https://github.com/angular/angular/issues/4416) [#4654](https://github.com/angular/angular/issues/4654)
+* **ngFor:** support a custom template ([6207b1a](https://github.com/angular/angular/commit/6207b1a)), closes [#4637](https://github.com/angular/angular/issues/4637)
+* **ngUpgrade:** support for content project from ng1->ng2 ([cd90e6e](https://github.com/angular/angular/commit/cd90e6e))
+* **ngUpgrade:** transclude content from ng2->ng1 ([19c1bd7](https://github.com/angular/angular/commit/19c1bd7)), closes [#4640](https://github.com/angular/angular/issues/4640)
+
+
+### BREAKING CHANGES
+
+- `angular2/test_lib` is now called `angular2/testing`
+ - `test_lib.js` -> `testing.js`
+ - `import {...} from 'angular2/test_lib'` -> `import {...} from 'angular2/testing'`
+- [()] desugaring changed:
+
+ Before:
+ ```
+ was desugared to
+ ```
+ After:
+ ```
+ is desugared to
+ ```
+
+### API DEPRECATION
+
+- "DI Binding" terminology has changed to "DI Providers" to avoid conflicts/confusion with data-binding. All commonly used apis that use "bind" or "binding" in the name still work but are deprecated and will be removed in future alpha releases. Please update your code:
+ - `bind` -> `provide`
+ - `@Component(bindings: ...)` -> `@Component(providers: ...)`
+ - `@Component(viewBindings: ...)` -> `@Component(viewProviders: ...)`
+ - `HTTP_BINDINGS` -> `HTTP_PROVIDERS`
+ - `JSONP_BINDINGS` -> `JSONP_PROVIDERS`
+ - `ROUTER_BINDINGS` -> `ROUTER_PROVIDERS`
+ - `FORM_BINDINGS` -> `FORM_PROVIDERS`
+ - `ELEMENT_PROBE_BINDINGS` -> `ELEMENT_PROBE_PROVIDERS`
+ - `NoBindingError` -> `NoProviderError`
+ - `AbstractBindingError` -> `AbstractProviderError`
+ - `InvalidBindingError` -> `InvalidProviderError`
+ - `beforeEachBindings` -> `beforeEachProviders`
+ - `Binding` -> `Provider`
+
+
+
+
+# 2.0.0-alpha.40 (2015-10-09)
+
+
+### Bug Fixes
+
+* **analyzer:** fix dart analyzer errors ([14fa007](https://github.com/angular/angular/commit/14fa007))
+* **core:** make .toRx() return Subject ([4a36fd8](https://github.com/angular/angular/commit/4a36fd8)), closes [#4521](https://github.com/angular/angular/issues/4521) [#4540](https://github.com/angular/angular/issues/4540)
+* **core:** remove NgZone_ and use NgZone instead ([bba0248](https://github.com/angular/angular/commit/bba0248))
+* **css:** when compiling CSS, leave absolute imports alone ([04b3dee](https://github.com/angular/angular/commit/04b3dee)), closes [#4592](https://github.com/angular/angular/issues/4592)
+* **dart/transform:** Run DeferredRewriter in the correct phase ([811d4c0](https://github.com/angular/angular/commit/811d4c0))
+* **dart/transform:** Sanitize generated library names ([ba6e0e1](https://github.com/angular/angular/commit/ba6e0e1))
+* **dart/transform:** Write correct ng_deps without deferred imports ([c94f239](https://github.com/angular/angular/commit/c94f239)), closes [#4587](https://github.com/angular/angular/issues/4587)
+* **location:** improve the 'No base href set' error message ([15ab6f6](https://github.com/angular/angular/commit/15ab6f6))
+* **render:** recurse into components/embedded templates not until all elements in a view have ([6d4bd5d](https://github.com/angular/angular/commit/6d4bd5d)), closes [#4551](https://github.com/angular/angular/issues/4551) [#4601](https://github.com/angular/angular/issues/4601)
+* **tests:** fix tests ([8b725c7](https://github.com/angular/angular/commit/8b725c7))
+* **tests:** fixes public api spec ([d60c7a9](https://github.com/angular/angular/commit/d60c7a9))
+* **typings:** update test.typings for abstract superclasses ([5458036](https://github.com/angular/angular/commit/5458036))
+* **web-workers:** fix bindings ([1100c9b](https://github.com/angular/angular/commit/1100c9b))
+* **XhrBackend:** setRequestHeader takes a string arg ([6b00b60](https://github.com/angular/angular/commit/6b00b60)), closes [#4597](https://github.com/angular/angular/issues/4597)
+
+### Features
+
+* **core:** add syntax sugar to make @View optional ([bd31b01](https://github.com/angular/angular/commit/bd31b01))
+* **dart/transform:** Track timing of transform tasks ([0757265](https://github.com/angular/angular/commit/0757265))
+* **router:** allow async routes to be defined with "loader" ([ee32b1b](https://github.com/angular/angular/commit/ee32b1b))
+* **transformers:** update transformers to handle components without @View ([a2e7ae5](https://github.com/angular/angular/commit/a2e7ae5))
+* **upgrade:** support binding of Ng1 form Ng2 ([8e1d2fb](https://github.com/angular/angular/commit/8e1d2fb)), closes [#4542](https://github.com/angular/angular/issues/4542)
+
+
+# 2.0.0-alpha.39 (2015-10-06)
+
+
+### Bug Fixes
+
+* **core:** keep styles for `ViewEncapsulation.Native` isolated per component ([0299d4a](https://github.com/angular/angular/commit/0299d4a)), closes [#4513](https://github.com/angular/angular/issues/4513) [#4524](https://github.com/angular/angular/issues/4524)
+* **core:** set `ViewEncapsulation.Emulated` as the default again ([a9aef8e](https://github.com/angular/angular/commit/a9aef8e)), closes [#4494](https://github.com/angular/angular/issues/4494)
+* **dart/transformer:** Correctly handle const object annotations ([decdbea](https://github.com/angular/angular/commit/decdbea)), closes [#4481](https://github.com/angular/angular/issues/4481)
+* **gulp:** use the new karma.Server api ([758efba](https://github.com/angular/angular/commit/758efba)), closes [#4375](https://github.com/angular/angular/issues/4375)
+* **http:** add missing semicolon ([150cc22](https://github.com/angular/angular/commit/150cc22))
+* **karma:** socket.io 1.x transport is now called 'polling' instead of 'xhr-polling' ([39e9bb6](https://github.com/angular/angular/commit/39e9bb6))
+* add test_lib.d.ts to type definitions in generated package.json ([4ebb1a9](https://github.com/angular/angular/commit/4ebb1a9))
+* **karma-dart-evalcache:** make the code compatible with karma 0.13.x ([a649992](https://github.com/angular/angular/commit/a649992))
+* **npm_publish:** update transitive typings provided in npm distribution ([2ebc74d](https://github.com/angular/angular/commit/2ebc74d))
+* **render:** keep bindings of components in content and view in the right order ([6fe8b85](https://github.com/angular/angular/commit/6fe8b85)), closes [#4522](https://github.com/angular/angular/issues/4522) [#4523](https://github.com/angular/angular/issues/4523)
+* **shims:** Don't rely on prefixed requestAnimationFrame ([9679fc9](https://github.com/angular/angular/commit/9679fc9)), closes [#4394](https://github.com/angular/angular/issues/4394)
+* **tslint:** fix d.ts file paths for node_modules dependencies ([2628631](https://github.com/angular/angular/commit/2628631))
+* **typings:** repair broken type-checking for StringMap ([208f3d4](https://github.com/angular/angular/commit/208f3d4)), closes [#4487](https://github.com/angular/angular/issues/4487)
+* **typings:** repair broken typechecks ([6093e28](https://github.com/angular/angular/commit/6093e28)), closes [#4507](https://github.com/angular/angular/issues/4507) [#4508](https://github.com/angular/angular/issues/4508)
+
+### Features
+
+* **upgrade:** support binding of Ng2 form Ng1 ([09371a3](https://github.com/angular/angular/commit/09371a3)), closes [#4458](https://github.com/angular/angular/issues/4458)
+
+
+### BREAKING CHANGES
+
+* `Renderer.registerComponent` now takes an additional argument ([0299d4a](https://github.com/angular/angular/commit/0299d4a)).
+
+
+
+# 2.0.0-alpha.38 (2015-10-03)
+
+
+### Bug Fixes
+
+* **annotation_matcher:** fix typo with Directive matchers ([841aa1a](https://github.com/angular/angular/commit/841aa1a))
+* **api:** align dart/js APIs ([af2cd4d](https://github.com/angular/angular/commit/af2cd4d))
+* **api:** remove animation from public API ([f7d46e7](https://github.com/angular/angular/commit/f7d46e7))
+* **api:** remove DomRenderer from public API ([105db02](https://github.com/angular/angular/commit/105db02)), closes [#4187](https://github.com/angular/angular/issues/4187)
+* **api:** remove RecordViewTuple / cleanup NgFor ([61b6a47](https://github.com/angular/angular/commit/61b6a47))
+* **api:** remove UNDEFINED ([6db9f90](https://github.com/angular/angular/commit/6db9f90))
+* **benchpress:** fix benchpress overreporting in chrome45 ([0653b82](https://github.com/angular/angular/commit/0653b82)), closes [#4011](https://github.com/angular/angular/issues/4011) [#4101](https://github.com/angular/angular/issues/4101)
+* **benchpress:** make benchpress fit for chrome 45 ([67b9414](https://github.com/angular/angular/commit/67b9414)), closes [#3411](https://github.com/angular/angular/issues/3411) [#3982](https://github.com/angular/angular/issues/3982)
+* **benchpress:** update build step, read and config ([6ae9686](https://github.com/angular/angular/commit/6ae9686)), closes [#4419](https://github.com/angular/angular/issues/4419)
+* **browser:** make Firefox to work with es6-shim ([e166f6f](https://github.com/angular/angular/commit/e166f6f))
+* **bug:** reflect Dart interfaces from superclass as well ([577ee37](https://github.com/angular/angular/commit/577ee37)), closes [#4221](https://github.com/angular/angular/issues/4221) [#4222](https://github.com/angular/angular/issues/4222)
+* **build:** add config for outputting the missing test_lib.d.ts file ([f6108c5](https://github.com/angular/angular/commit/f6108c5))
+* **build:** lazy-require es6-shim in the a1 router to prevent npm/gulp issues ([e4f94f0](https://github.com/angular/angular/commit/e4f94f0))
+* **build:** lock dart dev version ([43cca2d](https://github.com/angular/angular/commit/43cca2d))
+* **build:** switch to cjs output for es5. ([e9ad100](https://github.com/angular/angular/commit/e9ad100)), closes [#3974](https://github.com/angular/angular/issues/3974)
+* **build:** temporarily test dart with dart2js instead of pub serve ([eb7839e](https://github.com/angular/angular/commit/eb7839e))
+* **build:** Use Angular's testability API to wait for end of e2e tests ([33593cf](https://github.com/angular/angular/commit/33593cf)), closes [#3911](https://github.com/angular/angular/issues/3911)
+* **bundles:** add explicit format: cjs for empty files. ([ef61b81](https://github.com/angular/angular/commit/ef61b81))
+* **change_detection:** _throwError should not mask the original exception ([cec4b36](https://github.com/angular/angular/commit/cec4b36))
+* **code size:** do not rely on Uri in BrowserDomAdapter ([9dc1d6a](https://github.com/angular/angular/commit/9dc1d6a)), closes [#4182](https://github.com/angular/angular/issues/4182)
+* **compiler:** const is not supported in IE9 and IE10 ([b44c13b](https://github.com/angular/angular/commit/b44c13b)), closes [#4465](https://github.com/angular/angular/issues/4465)
+* **compiler:** Implement Token#toString for Operator ([3b9c086](https://github.com/angular/angular/commit/3b9c086)), closes [#4049](https://github.com/angular/angular/issues/4049)
+* **compiler:** minor cleanups and fixes ([0ed6fc4](https://github.com/angular/angular/commit/0ed6fc4))
+* **compiler:** remove attributes when expression in [attr.foo]='exp' evaluates to null ([045cc82](https://github.com/angular/angular/commit/045cc82)), closes [#4150](https://github.com/angular/angular/issues/4150) [#4163](https://github.com/angular/angular/issues/4163)
+* **core:** Document the new bootstrap APIs. Also rename rootBindings() to platformBindings( ([06f8330](https://github.com/angular/angular/commit/06f8330)), closes [#4218](https://github.com/angular/angular/issues/4218)
+* **core:** export bootstrap from core exports for JS ([4fd9cc2](https://github.com/angular/angular/commit/4fd9cc2)), closes [#4097](https://github.com/angular/angular/issues/4097)
+* **dart/transform:** Fix transformer output declaration ([1f2302e](https://github.com/angular/angular/commit/1f2302e))
+* **dart/transform:** Handle export cycles ([e7d65ad](https://github.com/angular/angular/commit/e7d65ad)), closes [#4370](https://github.com/angular/angular/issues/4370)
+* **debug:** make debug tools take ComponentRef ([70586b6](https://github.com/angular/angular/commit/70586b6)), closes [#4203](https://github.com/angular/angular/issues/4203)
+* **DirectiveResolver:** Synced with latest changes ([86bda28](https://github.com/angular/angular/commit/86bda28)), closes [#3928](https://github.com/angular/angular/issues/3928)
+* **dist:** don't distribute the HTML dart api docs ([be6d92c](https://github.com/angular/angular/commit/be6d92c)), closes [#4115](https://github.com/angular/angular/issues/4115) [#4211](https://github.com/angular/angular/issues/4211)
+* **dts generation:** add support for type aliases ([d782616](https://github.com/angular/angular/commit/d782616)), closes [#3952](https://github.com/angular/angular/issues/3952)
+* **dts generation:** rewrite the d.ts file code generator to fix bugs and apply type remap correctly ([ad3b9cf](https://github.com/angular/angular/commit/ad3b9cf))
+* **exception_handler:** fix error messages of wrapped exceptions ([f6cc573](https://github.com/angular/angular/commit/f6cc573)), closes [#4117](https://github.com/angular/angular/issues/4117)
+* **exceptions:** NoAnnotationError message is not displayed ([eaa20f6](https://github.com/angular/angular/commit/eaa20f6)), closes [#4215](https://github.com/angular/angular/issues/4215) [#4223](https://github.com/angular/angular/issues/4223)
+* **facade:** workaround for lack of Symbol.iterator in es6-shim ([390aacd](https://github.com/angular/angular/commit/390aacd)), closes [#4219](https://github.com/angular/angular/issues/4219) [#4216](https://github.com/angular/angular/issues/4216)
+* **fake_async:** remove unused variable ([ddde711](https://github.com/angular/angular/commit/ddde711))
+* **forms:** Also update viewModel in NgFormControl ([70f6a46](https://github.com/angular/angular/commit/70f6a46))
+* **forms:** avoid issues with nulls checking on validation status and other form states. ([7714d6a](https://github.com/angular/angular/commit/7714d6a)), closes [#4338](https://github.com/angular/angular/issues/4338)
+* **forms:** Update NgModel's viewModel when model changes ([e36966b](https://github.com/angular/angular/commit/e36966b)), closes [#3627](https://github.com/angular/angular/issues/3627)
+* **http:** change http interfaces to types ([3d6e3c2](https://github.com/angular/angular/commit/3d6e3c2)), closes [#4024](https://github.com/angular/angular/issues/4024)
+* **http:** throw if url is not string or Request ([3525d8a](https://github.com/angular/angular/commit/3525d8a)), closes [#4245](https://github.com/angular/angular/issues/4245) [#4257](https://github.com/angular/angular/issues/4257)
+* **ListWrapper:** make list slice in dart return empty list if start and end are inverted like JS ([bced3aa](https://github.com/angular/angular/commit/bced3aa))
+* **NgClass:** ignore empty and blank class names ([73351ac](https://github.com/angular/angular/commit/73351ac)), closes [#4033](https://github.com/angular/angular/issues/4033) [#4173](https://github.com/angular/angular/issues/4173)
+* **pipes:** add triple ticks around async_pipe code sample ([7b3161a](https://github.com/angular/angular/commit/7b3161a)), closes [#4110](https://github.com/angular/angular/issues/4110)
+* **query:** clean-up queryref during dehydration ([01cdd31](https://github.com/angular/angular/commit/01cdd31)), closes [#3944](https://github.com/angular/angular/issues/3944) [#3948](https://github.com/angular/angular/issues/3948)
+* **reflector:** merge prop metadata from getters and setters ([15164a8](https://github.com/angular/angular/commit/15164a8)), closes [#4006](https://github.com/angular/angular/issues/4006)
+* **router:** do not reuse common children with different parents ([77e8304](https://github.com/angular/angular/commit/77e8304))
+* **router:** load route config from async instructions ([5e49d7e](https://github.com/angular/angular/commit/5e49d7e)), closes [#4146](https://github.com/angular/angular/issues/4146)
+* **router:** recognize child components with empty segments ([3099449](https://github.com/angular/angular/commit/3099449)), closes [#4178](https://github.com/angular/angular/issues/4178)
+* **router:** throw when generating non-terminal link ([8aec215](https://github.com/angular/angular/commit/8aec215)), closes [#3979](https://github.com/angular/angular/issues/3979) [#4092](https://github.com/angular/angular/issues/4092)
+* **router:** use StringWrapper.startsWith ([6e0ca7f](https://github.com/angular/angular/commit/6e0ca7f))
+* **services:** export title service ([e2f5d87](https://github.com/angular/angular/commit/e2f5d87)), closes [#4271](https://github.com/angular/angular/issues/4271)
+* **sfx:** Include ngHttp in SFX bundle ([283415b](https://github.com/angular/angular/commit/283415b)), closes [#3933](https://github.com/angular/angular/issues/3933)
+* **shims:** add requestAnimationFrame shim for IE9 and Android ([4f56a01](https://github.com/angular/angular/commit/4f56a01)), closes [#4209](https://github.com/angular/angular/issues/4209)
+* **shims:** function.name to return empty string when no name ([3a7b50f](https://github.com/angular/angular/commit/3a7b50f))
+* **test:** Android browser does not support element.click() ([c83207f](https://github.com/angular/angular/commit/c83207f))
+* **test:** AngularProfiler should check before using modern APIs ([abc4ef3](https://github.com/angular/angular/commit/abc4ef3))
+* **test:** do not set ng.probe when ng is null or undefined ([df7f59b](https://github.com/angular/angular/commit/df7f59b))
+* **test:** make `evalModule` faster by caching spawned modules in the browser ([67c79ba](https://github.com/angular/angular/commit/67c79ba))
+* **test:** PostMessageBusSink tests failing in slow browsers ([55290b9](https://github.com/angular/angular/commit/55290b9))
+* **test:** StyleCompiler tests failing in Android browsers ([d646463](https://github.com/angular/angular/commit/d646463))
+* **test:** StyleCompiler tests failing in Android browsers ([9c97690](https://github.com/angular/angular/commit/9c97690)), closes [#4351](https://github.com/angular/angular/issues/4351)
+* **test_lib:** add missing types ([34deda5](https://github.com/angular/angular/commit/34deda5))
+* **test_lib:** reexport fake_async via angular/test ([687e7b5](https://github.com/angular/angular/commit/687e7b5))
+* **Typings:** Output public constructors in .d.ts files ([1926335](https://github.com/angular/angular/commit/1926335)), closes [#3926](https://github.com/angular/angular/issues/3926) [#3963](https://github.com/angular/angular/issues/3963)
+* **Typings & Test API:**
+ - Remove public exports added in 1926335b85af6c1fe56f4e36d0b95dcc92bb5c42 ([787d1f9](https://github.com/angular/angular/commit/787d1f9))
+ - closes [#4147](https://github.com/angular/angular/issues/4147)
+ - BREAKING CHANGE: `RootTestComponent` is no longer `DebugElement`; to get to component instance use `testComp.debugElement.componentInstance`
+* **upgrade:** assert correct interleaving of evaluation. ([a562230](https://github.com/angular/angular/commit/a562230)), closes [#4436](https://github.com/angular/angular/issues/4436)
+* **WebWorker:** Add zone support to MessageBus ([f3da37c](https://github.com/angular/angular/commit/f3da37c)), closes [#4053](https://github.com/angular/angular/issues/4053)
+* **WebWorker:** Fix Todo Server demo and add test to ensure the demo can bootstrap. ([696edde](https://github.com/angular/angular/commit/696edde)), closes [#3970](https://github.com/angular/angular/issues/3970)
+
+### Features
+
+* **angular_1_router:** add ngRouteShim module ([aed34e1](https://github.com/angular/angular/commit/aed34e1)), closes [#4266](https://github.com/angular/angular/issues/4266)
+* **animate:** adds basic support for CSS animations on enter and leave ([39ce9d3](https://github.com/angular/angular/commit/39ce9d3)), closes [#3876](https://github.com/angular/angular/issues/3876)
+* **animate:** cross-browser compatibility ([bffa2cb](https://github.com/angular/angular/commit/bffa2cb)), closes [#4243](https://github.com/angular/angular/issues/4243)
+* **Binding:** improve errors ([0319417](https://github.com/angular/angular/commit/0319417)), closes [#4358](https://github.com/angular/angular/issues/4358) [#4360](https://github.com/angular/angular/issues/4360)
+* **change detection:** export SimpleChange ([0a88e7b](https://github.com/angular/angular/commit/0a88e7b)), closes [#4337](https://github.com/angular/angular/issues/4337)
+* **change_detection:** allow triggering CD form ChangeDetectorRef ([63e7859](https://github.com/angular/angular/commit/63e7859)), closes [#4144](https://github.com/angular/angular/issues/4144)
+* **code size:** make assertionsEnabled() statically computable by dart2js ([241632a](https://github.com/angular/angular/commit/241632a)), closes [#4198](https://github.com/angular/angular/issues/4198)
+* **compiler:** add change detector generation ([12dd44f](https://github.com/angular/angular/commit/12dd44f)), closes [#4057](https://github.com/angular/angular/issues/4057)
+* **compiler:** add stylesheet compiler ([2384082](https://github.com/angular/angular/commit/2384082)), closes [#3891](https://github.com/angular/angular/issues/3891)
+* **compiler:** add TemplateCompiler ([457b689](https://github.com/angular/angular/commit/457b689)), closes [#4220](https://github.com/angular/angular/issues/4220)
+* **compiler:** allow to create ChangeDetectors from parsed templates ([2fea0c2](https://github.com/angular/angular/commit/2fea0c2)), closes [#3950](https://github.com/angular/angular/issues/3950)
+* **compiler:** support creating template commands ([0246b2a](https://github.com/angular/angular/commit/0246b2a)), closes [#4142](https://github.com/angular/angular/issues/4142)
+* **core:** Add a long-form syntax for Angular bootstrapping. ([97d1844](https://github.com/angular/angular/commit/97d1844)), closes [#3852](https://github.com/angular/angular/issues/3852)
+* **core:** add sugar to use ContentChildren and ViewChildren as prop decorators ([2e9de0b](https://github.com/angular/angular/commit/2e9de0b)), closes [#4237](https://github.com/angular/angular/issues/4237)
+* **core:** add support for @ContentChild and @ViewChild ([c2a60f1](https://github.com/angular/angular/commit/c2a60f1)), closes [#4251](https://github.com/angular/angular/issues/4251)
+* **core:** add support for @HostBinding and @HostListener ([df8e15c](https://github.com/angular/angular/commit/df8e15c)), closes [#3996](https://github.com/angular/angular/issues/3996)
+* **core:** add support for @Property and @Event decorators ([896add7](https://github.com/angular/angular/commit/896add7)), closes [#3992](https://github.com/angular/angular/issues/3992)
+* **core:** add support for ContentChildren and ViewChildren ([5dbe292](https://github.com/angular/angular/commit/5dbe292))
+* **core:** renames Property into Input and Event into Output ([adbfd29](https://github.com/angular/angular/commit/adbfd29))
+* **core:** Support multiple ChangeDetectors in a single LifeCycle. ([4f57990](https://github.com/angular/angular/commit/4f57990))
+* **core:** support properties and events in addition to inputs and outputs to make transiti ([c9901c5](https://github.com/angular/angular/commit/c9901c5)), closes [#4482](https://github.com/angular/angular/issues/4482)
+* **CORE_DIRECTIVES:** add NgStyle to CORE_DIRECTIVES ([5f15363](https://github.com/angular/angular/commit/5f15363)), closes [#4096](https://github.com/angular/angular/issues/4096) [#4161](https://github.com/angular/angular/issues/4161)
+* **dart/transform:** Declare transformer outputs ([2acc1ad](https://github.com/angular/angular/commit/2acc1ad))
+* **dart/transform:** Record property metadata ([64e8f93](https://github.com/angular/angular/commit/64e8f93)), closes [#1800](https://github.com/angular/angular/issues/1800) [#3267](https://github.com/angular/angular/issues/3267) [#4003](https://github.com/angular/angular/issues/4003)
+* **di:** add support for multi bindings ([7736964](https://github.com/angular/angular/commit/7736964))
+* **docs:** document change detection profiler ([4ec4dca](https://github.com/angular/angular/commit/4ec4dca))
+* **forms:** make NgControl -> NgValueAccessor dependency unidirectional ([00a4b2e](https://github.com/angular/angular/commit/00a4b2e)), closes [#4421](https://github.com/angular/angular/issues/4421)
+* **http:** Add support for strings as http method names ([34518f0](https://github.com/angular/angular/commit/34518f0)), closes [#4331](https://github.com/angular/angular/issues/4331)
+* **ng_for:** Add Even and Odd variables to ng_for ([a15b679](https://github.com/angular/angular/commit/a15b679)), closes [#4181](https://github.com/angular/angular/issues/4181)
+* **NgFor:** $last property support ([be95411](https://github.com/angular/angular/commit/be95411)), closes [#3991](https://github.com/angular/angular/issues/3991)
+* **perf:** change detection profiler ([8dd6c46](https://github.com/angular/angular/commit/8dd6c46)), closes [#4000](https://github.com/angular/angular/issues/4000)
+* **pipes:** add slice pipe that supports start and end indexes ([c2043ec](https://github.com/angular/angular/commit/c2043ec))
+* **pipes:** add support for pure pipes ([a8bdb69](https://github.com/angular/angular/commit/a8bdb69)), closes [#3966](https://github.com/angular/angular/issues/3966)
+* **query:** implement query update mechanism based on views. ([5ebeaf7](https://github.com/angular/angular/commit/5ebeaf7)), closes [#3973](https://github.com/angular/angular/issues/3973)
+* **query:** make QueryList notify on changes via an observable ([3aa2047](https://github.com/angular/angular/commit/3aa2047)), closes [#4395](https://github.com/angular/angular/issues/4395)
+* **query:** remove the 3-query-per-element limit ([4efc4a5](https://github.com/angular/angular/commit/4efc4a5)), closes [#4336](https://github.com/angular/angular/issues/4336)
+* **render:** add generic view factory based on the template commands ([1cf4575](https://github.com/angular/angular/commit/1cf4575)), closes [#4367](https://github.com/angular/angular/issues/4367)
+* **router:** enforce convention of CamelCase names in route aliases ([5298eb0](https://github.com/angular/angular/commit/5298eb0)), closes [#4083](https://github.com/angular/angular/issues/4083)
+* **router:** introduce new navigate method ([d9036c6](https://github.com/angular/angular/commit/d9036c6)), closes [#4040](https://github.com/angular/angular/issues/4040) [#4074](https://github.com/angular/angular/issues/4074)
+* **StringWrapper:** add support for JS slice method to string ([0808eea](https://github.com/angular/angular/commit/0808eea))
+* **TestComponentBuilder:** add #overrideBindings and #overrideViewBindings ([f91c087](https://github.com/angular/angular/commit/f91c087)), closes [#4052](https://github.com/angular/angular/issues/4052)
+* **tests:** add helper to eval a module ([2a126f7](https://github.com/angular/angular/commit/2a126f7))
+* **transformers:** record setters for query fields ([589ce31](https://github.com/angular/angular/commit/589ce31)), closes [#4344](https://github.com/angular/angular/issues/4344)
+* **upgrade:** Allow including ng2/1 components in ng1/2 ([8427863](https://github.com/angular/angular/commit/8427863)), closes [#3539](https://github.com/angular/angular/issues/3539)
+
+
+### BREAKING CHANGES
+
+#### Query
+
+[make QueryList notify on changes via an observable](https://github.com/angular/angular/commit/3aa2047)
+
+* Before: query.onChange(() => ...);
+* After: query.changes.subscribe((iterable) => {});
+
+#### Router
+
+[introduce new navigate method](https://github.com/angular/angular/commit/d9036c6)
+
+Previously, `router.navigate` took a string representing the URL.
+Now, it accepts an array that mirrors the link DSL.
+The old `navigate` method has been renamed to `router.navigateByUrl`.
+Either change your navigation calls to use the DSL (preferred) or
+call `router.navigateByUrl` instead.
+
+* Before:
+router.navigate
+
+* After:
+router.navigateUrl
+
+
+#### Pipes
+
+[add support for pure pipes](https://github.com/angular/angular/commit/a8bdb69)
+By default, pipes are pure. This means that an instance of a pipe will be reused and the pipe will be called only when its arguments change.
+
+Before:
+
+@Pipe({name: 'date'}) class DatePipe {} defines an impure pipe.
+
+After:
+
+@Pipe({name: 'date'}) class DatePipe {} defines a pure pipe.
+@Pipe({name: 'date', pure: false}) class DatePipe {} defines an impure pipe.
+
+* Before:
+@Pipe({name: 'date'}) class DatePipe {} defines an impure pipe.
+* After:
+@Pipe({name: 'date'}) class DatePipe {} defines a pure pipe.
+@Pipe({name: 'date', pure: false}) class DatePipe {} defines an impure pipe.
+
+#### ViewQuery
+
+[Implement query update mechanism based on views.](https://github.com/angular/angular/commit/5ebeaf7c9bdab8de6d11c7b4c4d0954553196903)
+
+* ViewQuery no longer supports the descendants flag. It queries the whole
+component view by default.
+
+Instead of working with finer grained element injectors, queries now
+iterate through the views as static units of modification of the
+application structure. Views already contain element injectors in the
+correct depth-first preorder.
+
+This allows us to remove children linked lists on element injectors and a
+lot of book keeping that is already present at the view level.
+
+Queries are recalculated using the afterContentChecked and
+afterViewChecked hooks, only during init and after a view container has
+changed.
+
+* Before:
+@ViewQuery(SomeDirective, {descendants: true})) someDirective
+* After:
+@ViewQuery(SomeDirective) someDirective
+
+#### DI
+
+[add support for multi bindings](https://github.com/angular/angular/commit/7736964a37d17cf0f1e5381c9a95a33ee863f02f)
+Previously a content binding of a component was visible to the directives in its view with the host constraint.
+This is not the case any more. To access that binding, remove the constraint.
+
+#### Core
+[remove the (^ syntax and make all DOM events bubbling)](https://github.com/angular/angular/commit/60ce8846710338228bc7db3d3c808c166e15e931)
+
+* Before
+
+
+
+* After
+
+
+
+
+#### Properties/Events (Inputs/Outputs)
+
+[Rename Property into Input and Event into Output](https://github.com/angular/angular/commit/adbfd29fd761135d51985564edcb4db7f8b6a26a)
+
+* Before:
+@Directive({properties: ['one'], events: ['two']})
+* After:
+@Directive({inputs: ['one'], outputs: ['two']})
+
+* Before:
+@Component({properties: ['one'], events: ['two']})
+* After:
+@Componet({inputs: ['one'], outputs: ['two']})
+
+* Before:
+class A {@Property() one; @Event() two;}
+* After:
+class A {@Input() one; @Output() two;}
+
+#### Compiler
+
+With a [new compiler](https://github.com/angular/angular/commit/76247b70973e3266e504e05381fbd7d85d4de5c6) `NgNonBindable`
+ is not a directive but rather a special attribute (`ng-non-bindable`) recognized by the compiler. This means that you
+can't import / use the `NgNonBindable` as a directive. You should remove all the imports for the the `NgNonBindable`
+directive and all the references to it in the `directives` section of the `@View` decorator.
+
+
+
+
+# 2.0.0-alpha.37 (2015-09-09)
+
+
+### Bug Fixes
+
+* **build:** delete unreferenced typings on npm install ([42e1b07](https://github.com/angular/angular/commit/42e1b07)), closes [#1636](https://github.com/angular/angular/issues/1636) [#3940](https://github.com/angular/angular/issues/3940)
+* **bundle:** don't include System.config in dev bundle ([a94f051](https://github.com/angular/angular/commit/a94f051)), closes [#3826](https://github.com/angular/angular/issues/3826) [#3862](https://github.com/angular/angular/issues/3862)
+* **ComponentUrlMapper:** support relative template URLs in Dartium ([7c7888d](https://github.com/angular/angular/commit/7c7888d)), closes [#2771](https://github.com/angular/angular/issues/2771) [#3743](https://github.com/angular/angular/issues/3743)
+* **core:** Fix type error ([6c3c606](https://github.com/angular/angular/commit/6c3c606))
+* **http:** change type declarations to interfaces and export EventEmitter ([10437ab](https://github.com/angular/angular/commit/10437ab))
+* **router:** re-export of Type ([b8be4bf](https://github.com/angular/angular/commit/b8be4bf)), closes [#3632](https://github.com/angular/angular/issues/3632) [#3704](https://github.com/angular/angular/issues/3704)
+* **RouteRegistry:** initialize RouteParams.params ([3791c4a](https://github.com/angular/angular/commit/3791c4a)), closes [#3755](https://github.com/angular/angular/issues/3755)
+* **test:** error in karma when systemjs imports fail ([7820086](https://github.com/angular/angular/commit/7820086)), closes [#3846](https://github.com/angular/angular/issues/3846)
+* **typings:** emit spread parameters ([a34d4c6](https://github.com/angular/angular/commit/a34d4c6)), closes [#3875](https://github.com/angular/angular/issues/3875)
+* **WebWorker:** Return boolean from `dispatchRenderEvent` ([457eb5d](https://github.com/angular/angular/commit/457eb5d))
+* **WebWorker:** WebWorkerRenderer removes views after they're destroyed ([9619636](https://github.com/angular/angular/commit/9619636)), closes [#3240](https://github.com/angular/angular/issues/3240) [#3894](https://github.com/angular/angular/issues/3894)
+
+### Features
+
+* **compile:** add HtmlParser, TemplateParser, ComponentMetadataLoader ([9f576b0](https://github.com/angular/angular/commit/9f576b0)), closes [#3839](https://github.com/angular/angular/issues/3839)
+* **compiler:** add full directive metadata and validation logic ([f93cd9c](https://github.com/angular/angular/commit/f93cd9c)), closes [#3880](https://github.com/angular/angular/issues/3880)
+* **core:** added afterContentInit, afterViewInit, and afterViewChecked hooks ([d49bc43](https://github.com/angular/angular/commit/d49bc43)), closes [#3897](https://github.com/angular/angular/issues/3897)
+* **core:** remove the (^ syntax and make all DOM events bubbling ([60ce884](https://github.com/angular/angular/commit/60ce884)), closes [#3864](https://github.com/angular/angular/issues/3864)
+* **docs:** document code size management tools for Dart ([6532171](https://github.com/angular/angular/commit/6532171))
+* **docs:** document unused reflection info tracking ([46f751b](https://github.com/angular/angular/commit/46f751b))
+* **exception_handler:** changed ExceptionHandler to use console.error instead of console.log ([3bb27de](https://github.com/angular/angular/commit/3bb27de)), closes [#3812](https://github.com/angular/angular/issues/3812)
+* **router:** hash-cons ComponentInstructions ([e1a7e03](https://github.com/angular/angular/commit/e1a7e03))
+* **router:** implement Router.isRouteActive ([de37729](https://github.com/angular/angular/commit/de37729))
+* **router:** router-link-active CSS class support ([36eb9d3](https://github.com/angular/angular/commit/36eb9d3)), closes [#3209](https://github.com/angular/angular/issues/3209)
+* **WebWorker:** Expose MessageBroker API ([358908e](https://github.com/angular/angular/commit/358908e)), closes [#3942](https://github.com/angular/angular/issues/3942)
+* **WebWorkers:** Add WebSocket MessageBuses for debugging apps ([4ba4427](https://github.com/angular/angular/commit/4ba4427)), closes [#3858](https://github.com/angular/angular/issues/3858)
+
+
+### BREAKING CHANGES
+
+#### Events
+
+* Before
+
+```html
+
`
+})
+class HelloCmp implements OnInit {
+ onInit() {
+ console.log('hello-cmp init');
+ }
+}
+```
+
+
+
+# 2.0.0-alpha.36 (2015-08-31)
+
+
+### Bug Fixes
+
+* **.d.ts:** show unknown fields as ‘any’ not ‘void’. ([a0b2408](https://github.com/angular/angular/commit/a0b2408)), closes [#3637](https://github.com/angular/angular/issues/3637)
+* **build:** do not run build/pubbuild.dart twice ([e72305e](https://github.com/angular/angular/commit/e72305e)), closes [#3831](https://github.com/angular/angular/issues/3831)
+* **build:** error when running `npm test` locally ([bf4b75e](https://github.com/angular/angular/commit/bf4b75e)), closes [#3806](https://github.com/angular/angular/issues/3806)
+* **build:** make e2e tests faster ([c2279dd](https://github.com/angular/angular/commit/c2279dd)), closes [#3822](https://github.com/angular/angular/issues/3822)
+* **change_detection:** fixed reflect properties as attributes ([a9ce454](https://github.com/angular/angular/commit/a9ce454)), closes [#3761](https://github.com/angular/angular/issues/3761)
+* **change_detection:** update the right change detector when using ON_PUSH mode ([195c5c2](https://github.com/angular/angular/commit/195c5c2))
+* **compiler:** detect and report error for views with empty templateUrl ([215c4aa](https://github.com/angular/angular/commit/215c4aa)), closes [#3762](https://github.com/angular/angular/issues/3762) [#3768](https://github.com/angular/angular/issues/3768)
+* **dart:** bad export in core.dart ([984e7b8](https://github.com/angular/angular/commit/984e7b8))
+* **examples:** Modifies web worker examples to be compatible with systemjs 0.18.10. ([675cb87](https://github.com/angular/angular/commit/675cb87)), closes [#3630](https://github.com/angular/angular/issues/3630)
+* **http:** allow using JSONP_INJECTABLES and HTTP_INJECTABLES in same injector ([5725f71](https://github.com/angular/angular/commit/5725f71)), closes [#3365](https://github.com/angular/angular/issues/3365) [#3390](https://github.com/angular/angular/issues/3390)
+* **http/http:** allow for commonjs as ngHttp ([16eb8ce](https://github.com/angular/angular/commit/16eb8ce)), closes [#3633](https://github.com/angular/angular/issues/3633)
+* **injector:** support getRootInjectors on dehydrated injectors. ([92da543](https://github.com/angular/angular/commit/92da543)), closes [#3760](https://github.com/angular/angular/issues/3760)
+* **injectors:** reset the construction counter in dynamic strategy. ([272ad61](https://github.com/angular/angular/commit/272ad61)), closes [#3635](https://github.com/angular/angular/issues/3635)
+* tag for browsers that do not suppor them ([ddcfd46](https://github.com/angular/angular/commit/ddcfd46)), closes [#3636](https://github.com/angular/angular/issues/3636)
+* **karma:** corrected race condition with RX loading ([8dc509f](https://github.com/angular/angular/commit/8dc509f))
+* **parser:** detect and report interpolation in expressions ([b039ec3](https://github.com/angular/angular/commit/b039ec3)), closes [#3645](https://github.com/angular/angular/issues/3645) [#3750](https://github.com/angular/angular/issues/3750)
+* **router:** allow router-link to link to redirects ([72e0b8f](https://github.com/angular/angular/commit/72e0b8f)), closes [#3335](https://github.com/angular/angular/issues/3335) [#3624](https://github.com/angular/angular/issues/3624)
+* **router:** subscribe should return subscription ([5c95b37](https://github.com/angular/angular/commit/5c95b37)), closes [#3491](https://github.com/angular/angular/issues/3491) [#3695](https://github.com/angular/angular/issues/3695)
+* **typings:** include static members ([894af28](https://github.com/angular/angular/commit/894af28)), closes [#3175](https://github.com/angular/angular/issues/3175) [#3780](https://github.com/angular/angular/issues/3780)
+* **ViewLoader:** provide componentId in missing template / templateUrl errors ([3871f89](https://github.com/angular/angular/commit/3871f89))
+* **wtf:** fix NgZone.run instrumentation ([5f0a0fd](https://github.com/angular/angular/commit/5f0a0fd)), closes [#3788](https://github.com/angular/angular/issues/3788)
+* wtf paramater passing on scope ([9afcb00](https://github.com/angular/angular/commit/9afcb00)), closes [#3726](https://github.com/angular/angular/issues/3726)
+
+### Features
+
+* track unused reflection data ([8336881](https://github.com/angular/angular/commit/8336881))
+* **browser:** support Edge ([3b49652](https://github.com/angular/angular/commit/3b49652)), closes [#3667](https://github.com/angular/angular/issues/3667)
+* **build:** added a temporary fix to make test.unit.dart work ([85ec34d](https://github.com/angular/angular/commit/85ec34d))
+* **change_detection:** added support for observable components and directives ([e8e430e](https://github.com/angular/angular/commit/e8e430e))
+* **change_detection:** do not reparse AST when using generated detectors ([d2d0715](https://github.com/angular/angular/commit/d2d0715))
+* **docs:** export type info for var and const exports ([9262727](https://github.com/angular/angular/commit/9262727)), closes [#3700](https://github.com/angular/angular/issues/3700)
+* **facade:** add maximum method for ListWrapper ([b5c4d8b](https://github.com/angular/angular/commit/b5c4d8b))
+* **http:** xhr error listener invokes throw on EventEmitter ([f2d3bdb](https://github.com/angular/angular/commit/f2d3bdb)), closes [#2667](https://github.com/angular/angular/issues/2667)
+* **router:** add angular 1.x router ([fde026a](https://github.com/angular/angular/commit/fde026a))
+* **router:** add reuse support for angular 1.x router ([ddb62fe](https://github.com/angular/angular/commit/ddb62fe)), closes [#3698](https://github.com/angular/angular/issues/3698)
+* **url_resolver:** Allow a developer to customize their package prefix ([9cc1cd2](https://github.com/angular/angular/commit/9cc1cd2)), closes [#3794](https://github.com/angular/angular/issues/3794)
+
+
+
# 2.0.0-alpha.35 (2015-08-19)
@@ -139,7 +725,7 @@
-* The router was previously exported as ng.router in the
+* The router was previously exported as ng.router in the
angular.sfx.dev.js bundle, but now it is exported as ngRouter.
* The selector for the CSSClass directive was changed
@@ -148,7 +734,6 @@ renamed from CSSClass to NgClass
-
# 2.0.0-alpha.34 (2015-08-07)
@@ -256,8 +841,7 @@ renamed from CSSClass to NgClass
#### Breaking Changes
-*
-View renderer used to take normalized CSS class names (ex. fooBar for foo-bar).
+* View renderer used to take normalized CSS class names (ex. fooBar for foo-bar).
With this change a rendered implementation gets a calss name as specified in a
template, without any transformations / normalization. This change only affects
custom view renderers that should be updated accordingly.
@@ -770,3 +1354,4 @@ After
+
diff --git a/DEVELOPER.md b/DEVELOPER.md
index 95ef5e4ec88e2..42601892cad5e 100644
--- a/DEVELOPER.md
+++ b/DEVELOPER.md
@@ -22,21 +22,23 @@ if you'd like to contribute to Angular.
Before you can build and test Angular, you must install and configure the
following products on your development machine:
-* [Dart](https://www.dartlang.org) (version ` >=1.10.0-dev.1.10 <2.0.0`), specifically the Dart-SDK and
+* [Dart](https://www.dartlang.org) (version ` >=1.12.0 <2.0.0`), specifically the Dart-SDK and
Dartium (a version of [Chromium](http://www.chromium.org) with native support for Dart through
the Dart VM). One of the **simplest** ways to get both is to install the **Dart Editor bundle**,
which includes the editor, SDK and Dartium. See the [Dart tools](https://www.dartlang.org/tools)
- download [page for instructions](https://www.dartlang.org/tools/download.html). You can also
- download both **stable** and **dev** channel versions from the [download
- archive](https://www.dartlang.org/tools/download-archive).
+ download [page for instructions](https://www.dartlang.org/tools/download.html).
+ You can also download both **stable** and **dev** channel versions from the [download
+ archive](https://www.dartlang.org/tools/download-archive). In that case, on Windows, Dart must be added
+ to the `Path` (e.g. `path-to-dart-sdk-folder\bin`) and a new `DARTIUM_BIN` environment variable must be
+ created, pointing to the executable (e.g. `path-to-dartium-folder\chrome.exe).`
* [Git](http://git-scm.com) and/or the **GitHub app** (for [Mac](http://mac.github.com) or
[Windows](http://windows.github.com)); [GitHub's Guide to Installing
Git](https://help.github.com/articles/set-up-git) is a good source of information.
-* [Node.js](http://nodejs.org), (version `>=0.12.0 <0.13.0`) which is used to run a development web server,
+* [Node.js](http://nodejs.org), (version `>=4.1.1 <5`) which is used to run a development web server,
run tests, and generate distributable files. We also use Node's Package Manager, `npm`
- (version `>=2.0 <3.0`), which comes with Node. Depending on your system, you can install Node either from
+ (version `>=2.14.5 <3.0`), which comes with Node. Depending on your system, you can install Node either from
source or as a pre-packaged bundle.
* [Chrome Canary](https://www.google.com/chrome/browser/canary.html), a version of Chrome with
@@ -255,7 +257,22 @@ to some whitespace difference.
- Working directory: `$ProjectFileDir$`
* `clang-format` integrations are also available for many popular editors (`vim`, `emacs`,
`Sublime Text`, etc.).
+
+## Generating the API documentation
+The following gulp task will generate the API docs in the `dist/angular.io/partials/api/angular2`:
+
+```shell
+$(npm bin)/gulp docs/angular.io
+```
+
+You can serve the generated documentation to check how it would render on [angular.io](https://angular.io/):
+- check out the [angular.io repo](https://github.com/angular/angular.io) locally,
+- install dependencies as described in the [angular.io README](https://github.com/angular/angular.io/blob/master/README.md),
+- copy the generated documentation from your local angular repo at `angular/dist/angular.io/partials/api/angular2` to your local angular.io repo at `angular.io/public/docs/js/latest/api`,
+- run `harp compile` at the root of the angular.io repo to check the generated documentation for errors,
+- run `harp server` and open a browser at `http://localhost:9000/docs/js/latest/api/` to check the rendered documentation.
+
## Project Information
### Folder structure
diff --git a/NAMING.md b/NAMING.md
new file mode 100644
index 0000000000000..69e16b406bf5f
--- /dev/null
+++ b/NAMING.md
@@ -0,0 +1,32 @@
+Naming Conventions in Angular2
+---
+
+In general Angular2 should follow TypeScript naming conventions.
+See: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines
+
+
+Classes:
+ - Example: `Compiler`, `ApplicationMetadata`
+ - Camel case with first letter upper-case
+ - In general prefer single words. (This is so that when appending `Proto` or `Factory` the class
+ is still reasonable to work with.)
+ - Should not end with `Impl` or any other word which describes a specific implementation of an
+ interface.
+
+
+Interfaces:
+ - Follow the same rules as Classes
+ - Should not have `I` or `Interface` in the name or any other way of identifying it as an interface.
+
+
+Methods and functions:
+ - Example: `bootstrap`, `someMethod`
+ - Should be camel case with first lower case
+
+
+Constants
+ - Example: `CORE_DIRECTIVES`
+ - Should be all uppercase with SNAKE_CASE
+
+
+
diff --git a/README.md b/README.md
index f574a108fb448..a4d10c98ab805 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,7 @@
[![Issue Stats](http://issuestats.com/github/angular/angular/badge/issue)](http://issuestats.com/github/angular/angular)
[![npm version](https://badge.fury.io/js/angular2.svg)](http://badge.fury.io/js/angular2)
[![Downloads](http://img.shields.io/npm/dm/angular2.svg)](https://npmjs.org/package/angular2)
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/angular2-ci.svg)](https://saucelabs.com/u/angular2-ci)
Angular
=========
@@ -35,7 +36,7 @@ guidelines for [contributing][contributing] and then check out one of our issues
[contributing]: http://github.com/angular/angular/blob/master/CONTRIBUTING.md
[dart]: http://www.dartlang.org
[dartium]: http://www.dartlang.org/tools/dartium
-[download]: http://angular.io/download
+[download]: http://angular.io/download/
[quickstart]: https://angular.io/docs/js/latest/quickstart.html
[ng2]: http://angular.io
[ngDart]: http://angulardart.org
diff --git a/TOOLS.md b/TOOLS.md
new file mode 100644
index 0000000000000..8b4b6b57c6e54
--- /dev/null
+++ b/TOOLS.md
@@ -0,0 +1,4 @@
+# Developer Tools for Angular 2
+
+- [JavaScript](TOOLS_JS.md)
+- [Dart](TOOLS_DART.md)
diff --git a/TOOLS_DART.md b/TOOLS_DART.md
new file mode 100644
index 0000000000000..bef20687463b7
--- /dev/null
+++ b/TOOLS_DART.md
@@ -0,0 +1,324 @@
+# Developer Tools for Dart
+
+Use these tools and techniques to increase your app's performance
+and reliability.
+
+* [Angular debugging tools](#angular-debugging-tools)
+* [Code size](#code-size)
+* [Performance](#performance)
+
+
+## Angular debugging tools
+
+Starting with alpha.38, Angular provides a set of debugging tools
+that are accessible from any browser's developer console.
+In Chrome, you can get to the dev console by pressing
+Ctrl + Shift + J (on Mac: Cmd + Opt + J).
+
+### Enabling the debugging tools
+
+By default the debugging tools are disabled.
+Enable the debugging tools as follows:
+
+```dart
+import 'package:angular2/tools.dart';
+
+main() async {
+ var appRef = await bootstrap(Application);
+ enableDebugTools(appRef);
+}
+```
+
+
+
+
+### Using the debugging tools
+
+In the browser, open the dev console. The top-level object is called `ng` and
+contains more specific tools inside it.
+
+For example, to run the change detection profiler on your app:
+
+
+```javascript
+// In the dev console:
+ng.profiler.timeChangeDetection();
+```
+
+The [Change detection profiler](#change-detection-profiler) section
+has more details.
+
+
+
+## Code size
+
+Code must be downloaded, parsed, and executed. Too much code can lead to
+slow application start-up time, especially on slow networks and low-end devices.
+The tools and techniques in this section can help you to identify
+unnecessarily large code and to reduce code size.
+
+### Finding contributors to code size
+
+Options for investigating code size include the `--dump-info` dart2js option,
+ng2soyc, `reflector.trackUsage()`, and code coverage information
+from the Dart VM.
+
+#### --dump-info
+
+The `--dump-info` option of `dart2js` outputs information about what happened
+during compilation. You can specify `--dump-info` in `pubspec.yaml`:
+
+```yaml
+transformers:
+...
+- $dart2js:
+ commandLineOptions:
+ - --dump-info
+```
+
+The [Dump Info Visualizer](https://github.com/dart-lang/dump-info-visualizer)
+can help you analyze the output.
+For more information, see the
+[dart2js_info API reference](http://dart-lang.github.io/dart2js_info/doc/api/).
+
+#### ng2soyc.dart
+
+[ng2soyc](https://github.com/angular/ng2soyc.dart) is a utility for analyzing
+code size contributors in Angular 2 applications. It groups code size by
+library and, assuming your library names follow
+[standard naming conventions](https://www.dartlang.org/articles/style-guide/#do-prefix-library-names-with-the-package-name-and-a-dot-separated-path)
+(package.library.sublibrary...), gives the code size breakdown at
+each level. To reduce noise in the output of very large apps, ng2soyc provides
+an option to hide libraries that are too small, so you can focus on the biggest
+contributors.
+
+#### Track unused reflection data
+
+
+
+Call `reflector.trackUsage()` to track reflection information used
+by the application. Reflection information (`ReflectionInfo`) is a data
+structure that stores information about your application that Angular uses for
+locating DI factories, generated change detectors and other code related to a
+given type. After exercising your application, call `reflector.listUnusedKeys()`
+to get a list of types and functions whose reflection information was retained
+but never used by the application.
+
+#### Use code coverage to find dead code
+
+When running in Dartium (or in the Dart VM, in general) you can request code
+coverage information from the VM. You can either use
+[observatory](https://www.dartlang.org/tools/observatory/) or download
+the coverage file and use your own tools to inspect it. Lines of code that are
+not covered are top candidates for dead code.
+
+Keep in mind, however, that uncovered code is not sufficient evidence of dead
+code, only necessary evidence. It is perfectly possible that you simply didn't
+exercise your application in a way that triggers the execution of uncovered
+code. A common example is error handling code. Just because your testing never
+encountered an error does not mean the error won't happen in production. You
+therefore don't have to rush and remove all the `catch` blocks.
+
+### Reducing code size
+
+To reduce code size, you can disable reflection,
+enable minification, and manually remove dead code.
+You can also try less safe options such as
+telling dart2js to trust type annotations.
+
+
+#### Disable reflection
+
+`dart:mirrors` allows discovering program metadata at runtime. However, this
+means that `dart2js` needs to retain that metadata and thus increase the size
+of resulting JS output. In practice, however, it is possible to extract most
+metadata necessary for your metaprogramming tasks statically using a
+transformer and `package:analyzer`, and act on it before compiling to JS.
+
+#### Enable minification
+
+Minification shortens all your `longMethodNames` into 2- or 3-letter long
+symbols. `dart2js` ensures that this kind of renaming is done safely, without
+breaking the functionality of your programs. You can enable it in `pubspec.yaml`
+under `$dart2js` transformer:
+
+```yaml
+transformers:
+...
+- $dart2js:
+ minify: true
+```
+
+#### Manually remove dead code
+
+`dart2js` comes with dead code elimination out-of-the-box. However, it may not
+always be able to tell if a piece of code could be used. Consider the following
+example:
+
+```dart
+/// This function decides which serialization format to use
+void setupSerializers() {
+ if (server.doYouSupportProtocolBuffers()) {
+ useProtobufSerializers();
+ } else {
+ useJsonSerializers();
+ }
+}
+```
+
+In this example the application asks the server what kind of serialization
+format it uses and dynamically chooses one or the other. `dart2js` can't
+tell whether the server responds with yes or no, so it must retain both
+kinds of serializers. However, if you know that your server supports
+protocol buffers, you can remove that `if` block entirely and default to
+protocol buffers.
+
+Code coverage (see above) is a good way to find dead code in your app.
+
+#### Unsafe options
+
+Dart also provides more aggressive optimization options. However, you have to
+be careful when using them and as of today the benefits aren't that clear. If
+your type annotations are inaccurate you may end up with non-Darty runtime
+behavior, including the classic "undefined is not a function" tautology, as
+well as the "keep on truckin'" behavior, e.g. `null + 1 == 1` and
+`{} + [] == 0`.
+
+`--trust-type-annotations` tells `dart2js` to trust that your type annotations
+are correct. So if you have a function `foo(Bar bar)` the compiler can omit the
+check that `bar` is truly `Bar` when calling methods on it.
+
+`--trust-primitives` tells `dart2js` that primitive types, such as numbers and
+booleans are never `null` when performing arithmetic, and that your program
+does not run into range error when operating on lists, letting the compiler
+remove some of the error checking code.
+
+Specify these options in `pubspec.yaml`.
+
+Example:
+
+```yaml
+transformers:
+...
+- $dart2js:
+ commandLineOptions:
+ - --trust-type-annotations
+ - --trust-primitives
+```
+
+## Performance
+
+### Change detection profiler
+
+If your application is janky (it misses frames) or is slow according to other
+metrics it is important to find the root cause of the issue. Change detection
+is a phase in Angular's lifecycle that detects changes in values that are
+bound to UI, and if it finds a change it performs the corresponding UI update.
+However, sometimes it is hard to tell if the slowness is due to the act of
+computing the changes being slow, or due to the act of applying those changes
+to the UI. For your application to be performant it is important that the
+process of computing changes is very fast. For best results it should be under
+3 milliseconds in order to leave room for the application logic, the UI updates
+and browser's rendering pipeline to fit withing the 16 millisecond frame
+(assuming the 60 FPS target frame rate).
+
+Change detection profiler repeatedly performs change detection without invoking
+any user actions, such as clicking buttons or entering text in input fields. It
+then computes the average amount of time it took to perform a single cycle of
+change detection in milliseconds and prints it to the console. This number
+depends on the current state of the UI. You are likely to see different numbers
+as you go from one screen in your application to another.
+
+#### Running the profiler
+
+Enable the debugging tools (see above),
+then in the dev console enter the following:
+
+```javascript
+ng.profiler.timeChangeDetection();
+```
+
+The results are printed to the console.
+
+#### Recording CPU profiles
+
+To record a profile, pass `{record: true}` to `timeChangeDetection()`:
+
+```javascript
+ng.profiler.timeChangeDetection({record: true});
+```
+
+Then open the **Profiles** tab. The recorded profile has the title
+**Change Detection**. In Chrome, if you record the profile repeatedly, all the
+profiles are nested under Change Detection.
+
+#### Interpreting the numbers
+
+In a properly designed application, repeated attempts to detect changes without
+any user actions result in no changes to the UI. It is
+also desirable to have the cost of a user action be proportional to the amount
+of UI changes required. For example, popping up a menu with 5 items should be
+vastly faster than rendering a table of 500 rows and 10 columns. Therefore,
+change detection with no UI updates should be as fast as possible. Ideally the
+number printed by the profiler should be well below the length of a single
+animation frame (16ms). A good rule of thumb is to keep it under 3ms.
+
+#### Investigating slow change detection
+
+So you found a screen in your application on which the profiler reports a very
+high number (i.e. >3ms). This is where a recorded CPU profile can help. Enable
+recording while profiling:
+
+```javascript
+ng.profiler.timeChangeDetection({record: true});
+```
+
+Then look for hot spots using
+[Chrome CPU profiler](https://developer.chrome.com/devtools/docs/cpu-profiling).
+
+#### Reducing change detection cost
+
+There are many reasons for slow change detection. To gain intuition about
+possible causes it helps to understand how change detection works. Such a
+discussion is outside the scope of this document,
+but here are some key concepts.
+
+
+
+By default, Angular uses a _dirty checking_ mechanism to find model changes.
+This mechanism involves evaluating every bound expression that's active on the
+UI. These usually include text interpolation via `{{expression}}` and property
+bindings via `[prop]="expression"`. If any of the evaluated expressions are
+costly to compute, they might contribute to slow change detection. A good way to
+speed things up is to use plain class fields in your expressions and avoid any
+kind of computation. For example:
+
+```dart
+@View(
+ template: ''
+)
+class FancyButton {
+ // GOOD: no computation, just returns the value
+ bool isEnabled;
+
+ // BAD: computes the final value upon request
+ String _title;
+ String get title => _title.trim().toUpperCase();
+}
+```
+
+Most cases like these can be solved by precomputing the value and storing the
+final value in a field.
+
+Angular also supports a second type of change detection: the _push_ model. In
+this model, Angular does not poll your component for changes. Instead, the
+component tells Angular when it changes, and only then does Angular perform
+the update. This model is suitable in situations when your data model uses
+observable or immutable objects.
+
+
diff --git a/TOOLS_JS.md b/TOOLS_JS.md
new file mode 100644
index 0000000000000..cf3b9f34fcea9
--- /dev/null
+++ b/TOOLS_JS.md
@@ -0,0 +1,140 @@
+# Developer Tools for JavaScript
+
+Here you will find a collection of tools and tips for keeping your application
+perform well and contain fewer bugs.
+
+## Angular debug tools in the dev console
+
+Angular provides a set of debug tools that are accessible from any browser's
+developer console. In Chrome the dev console can be accessed by pressing
+Ctrl + Shift + j.
+
+### Enabling debug tools
+
+By default the debug tools are disabled. You can enable debug tools as follows:
+
+```typescript
+import 'angular2/tools';
+
+bootstrap(Application).then((appRef) => {
+ enableDebugTools(appRef);
+});
+```
+
+### Using debug tools
+
+In the browser open the developer console (Ctrl + Shift + j in Chrome). The
+top level object is called `ng` and contains more specific tools inside it.
+
+Example:
+
+```javascript
+ng.profiler.timeChangeDetection();
+```
+
+## Performance
+
+### Change detection profiler
+
+If your application is janky (it misses frames) or is slow according to other
+metrics it is important to find the root cause of the issue. Change detection
+is a phase in Angular's lifecycle that detects changes in values that are
+bound to UI, and if it finds a change it performs the corresponding UI update.
+However, sometimes it is hard to tell if the slowness is due to the act of
+computing the changes being slow, or due to the act of applying those changes
+to the UI. For your application to be performant it is important that the
+process of computing changes is very fast. For best results it should be under
+3 milliseconds in order to leave room for the application logic, the UI updates
+and browser's rendering pipeline to fit withing the 16 millisecond frame
+(assuming the 60 FPS target frame rate).
+
+Change detection profiler repeatedly performs change detection without invoking
+any user actions, such as clicking buttons or entering text in input fields. It
+then computes the average amount of time it took to perform a single cycle of
+change detection in milliseconds and prints it to the console. This number
+depends on the current state of the UI. You will likely see different numbers
+as you go from one screen in your application to another.
+
+#### Running the profiler
+
+Enable debug tools (see above), then in the dev console enter the following:
+
+```javascript
+ng.profiler.timeChangeDetection();
+```
+
+The results will be printed to the console.
+
+#### Recording CPU profile
+
+Pass `{record: true}` an argument:
+
+```javascript
+ng.profiler.timeChangeDetection({record: true});
+```
+
+Then open the "Profiles" tab. You will see the recorded profile titled
+"Change Detection". In Chrome, if you record the profile repeatedly, all the
+profiles will be nested under "Change Detection".
+
+#### Interpreting the numbers
+
+In a properly-designed application repeated attempts to detect changes without
+any user actions should result in no changes to be applied on the UI. It is
+also desirable to have the cost of a user action be proportional to the amount
+of UI changes required. For example, popping up a menu with 5 items should be
+vastly faster than rendering a table of 500 rows and 10 columns. Therefore,
+change detection with no UI updates should be as fast as possible. Ideally the
+number printed by the profiler should be well below the length of a single
+animation frame (16ms). A good rule of thumb is to keep it under 3ms.
+
+#### Investigating slow change detection
+
+So you found a screen in your application on which the profiler reports a very
+high number (i.e. >3ms). This is where a recorded CPU profile can help. Enable
+recording while profiling:
+
+```javascript
+ng.profiler.timeChangeDetection({record: true});
+```
+
+Then look for hot spots using
+[Chrome CPU profiler](https://developer.chrome.com/devtools/docs/cpu-profiling).
+
+#### Reducing change detection cost
+
+There are many reasons for slow change detection. To gain intuition about
+possible causes it would help to understand how change detection works. Such a
+discussion is outside the scope of this document (TODO link to docs), but here
+are some key concepts in brief.
+
+By default Angular uses "dirty checking" mechanism for finding model changes.
+This mechanism involves evaluating every bound expression that's active on the
+UI. These usually include text interpolation via `{{expression}}` and property
+bindings via `[prop]="expression"`. If any of the evaluated expressions are
+costly to compute they could contribute to slow change detection. A good way to
+speed things up is to use plain class fields in your expressions and avoid any
+kinds of computation. Example:
+
+```typescript
+@View({
+ template: ''
+})
+class FancyButton {
+ // GOOD: no computation, just return the value
+ isEnabled: boolean;
+
+ // BAD: computes the final value upon request
+ _title: String;
+ get title(): String { return this._title.trim().toUpperCase(); }
+}
+```
+
+Most cases like these could be solved by precomputing the value and storing the
+final value in a field.
+
+Angular also supports a second type of change detection - the "push" model. In
+this model Angular does not poll your component for changes. Instead, the
+component "tells" Angular when it changes and only then does Angular perform
+the update. This model is suitable in situations when your data model uses
+observable or immutable objects (also a discussion for another time).
diff --git a/docs/angular.io-package/index.js b/docs/angular.io-package/index.js
deleted file mode 100644
index d6521df30069d..0000000000000
--- a/docs/angular.io-package/index.js
+++ /dev/null
@@ -1,64 +0,0 @@
-var path = require('canonical-path');
-var Package = require('dgeni').Package;
-var basePackage = require('../public-docs-package');
-
-var PARTIAL_PATH = 'partials';
-var MODULES_DOCS_PATH = PARTIAL_PATH + '/api';
-
-module.exports = new Package('angular.io', [basePackage])
-
-.factory(require('./services/renderMarkdown'))
-.processor(require('./processors/addJadeDataDocsProcessor'))
-
-// Configure rendering
-.config(function(templateFinder, templateEngine) {
-
- templateFinder.templateFolders
- .unshift(path.resolve(__dirname, 'templates'));
-})
-
-.config(function(writeFilesProcessor) {
- writeFilesProcessor.outputFolder = 'dist/angular.io';
-})
-
-.config(function(readFilesProcessor, generateNavigationDoc, createOverviewDump) {
- // Clear out unwanted processors
- readFilesProcessor.$enabled = false;
- generateNavigationDoc.$enabled = false;
- createOverviewDump.$enabled = false;
-})
-
-
-
-
-.config(function(computeIdsProcessor, computePathsProcessor, EXPORT_DOC_TYPES) {
-
- computePathsProcessor.pathTemplates.push({
- docTypes: ['module'],
- pathTemplate: '${id}/',
- outputPathTemplate: MODULES_DOCS_PATH + '/${id}/index.jade'
- });
-
- computePathsProcessor.pathTemplates.push({
- docTypes: EXPORT_DOC_TYPES,
- pathTemplate: '${moduleDoc.id}/${name}-${docType}.html',
- outputPathTemplate: MODULES_DOCS_PATH + '/${moduleDoc.id}/${name}-${docType}.jade',
- });
-
- computePathsProcessor.pathTemplates.push({
- docTypes: ['jade-data'],
- pathTemplate: '${originalDoc.id}/_data',
- outputPathTemplate: MODULES_DOCS_PATH + '/${path}.json'
- });
-})
-
-.config(function(getLinkInfo) {
- getLinkInfo.relativeLinks = true;
-})
-
-
-.config(function(templateEngine, getInjectables) {
- templateEngine.filters = templateEngine.filters.concat(getInjectables([require('./rendering/trimBlankLines')]));
-});
-
-
diff --git a/docs/angular.io-package/processors/addJadeDataDocsProcessor.js b/docs/angular.io-package/processors/addJadeDataDocsProcessor.js
deleted file mode 100644
index 34ff8a6016ddb..0000000000000
--- a/docs/angular.io-package/processors/addJadeDataDocsProcessor.js
+++ /dev/null
@@ -1,76 +0,0 @@
-var _ = require('lodash');
-var path = require('canonical-path');
-
-var titleCase = function(text) {
- return text.replace(/(.)(.*)/, function(_, first, rest) {
- return first.toUpperCase() + rest;
- });
-};
-
-/*
-* Create _data.json file for Harp pages
-*
-* http://harpjs.com/docs/development/metadata
-*
-* This method creates the meta data required for each page
-* such as the title, description, etc. This meta data is used
-* in the harp static site generator to create the title for headers
-* and the navigation used in the API docs
-*
-*/
-
-module.exports = function addJadeDataDocsProcessor() {
- return {
- $runAfter: ['adding-extra-docs'],
- $runBefore: ['extra-docs-added'],
- $process: function(docs) {
- var extraDocs = [];
- var modules = [];
-
-
- /*
- * Create Data for Modules
- *
- * Modules must be public and have content
- */
-
- _.forEach(docs, function(doc) {
- if (doc.docType === 'module' && !doc.private && doc.exports.length) {
- modules.push(doc);
-
- // GET DATA FOR INDEX PAGE OF MODULE SECTION
- var indexPageInfo = [{
- name: 'index',
- title: _.map(path.basename(doc.fileInfo.baseName).split('_'), function(part) {
- return titleCase(part);
- }).join(' '),
- intro: doc.description.replace('"', '\"').replace(/\r?\n|\r/g,"")
- }];
-
- // GET DATA FOR EACH PAGE (CLASS, VARS, FUNCTIONS)
- var modulePageInfo = _.map(doc.exports, function(exportDoc) {
- return {
- name: exportDoc.name + '-' + exportDoc.docType,
- title: exportDoc.name
- };
- });
-
- //COMBINE PAGE DATA
- var allPageData = indexPageInfo.concat(modulePageInfo);
-
- // PUSH DATA TO EXTRA DOCS ARRAY
- extraDocs.push({
- id: doc.id + "-data",
- aliases: [doc.id + "-data"],
- docType: 'jade-data',
- originalDoc: doc,
- data: allPageData
- });
- }
- });
-
-
- return docs.concat(extraDocs);
- }
- };
-};
diff --git a/docs/angular.io-package/rendering/trimBlankLines.js b/docs/angular.io-package/rendering/trimBlankLines.js
deleted file mode 100644
index 82728d76355e8..0000000000000
--- a/docs/angular.io-package/rendering/trimBlankLines.js
+++ /dev/null
@@ -1,12 +0,0 @@
-module.exports = function(encodeCodeBlock) {
- return {
- name: 'trimBlankLines',
- process: function(str) {
- var lines = str.split(/\r?\n/);
- while(lines[0] === '') {
- lines.shift();
- }
- return lines.join('\n');
- }
- };
-};
\ No newline at end of file
diff --git a/docs/angular.io-package/services/renderMarkdown.js b/docs/angular.io-package/services/renderMarkdown.js
deleted file mode 100644
index 74d4ee1ac8882..0000000000000
--- a/docs/angular.io-package/services/renderMarkdown.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var marked = require('marked');
-var Encoder = require('node-html-encoder').Encoder;
-var html2jade = require('html2jade');
-var indentString = require('indent-string');
-
-
-function stripTags(s) { //from sugar.js
- return s.replace(RegExp('<\/?[^<>]*>', 'gi'), '');
-}
-
-// entity type encoder
-var encoder = new Encoder('entity');
-
-
-
-/**
- * @dgService renderMarkdown
- * @description
- * Render the markdown in the given string as HTML.
- */
-module.exports = function renderMarkdown(trimIndentation) {
-
- var renderer = new marked.Renderer();
-
- renderer.code = function(code, lang, escaped) {
-
- var cssClasses = ['prettyprint', 'linenums'];
- var trimmedCode = trimIndentation(code);
-
- if(lang) {
- if(lang=='html') {
- trimmedCode = encoder.htmlEncode(trimmedCode);
- }
- cssClasses.push(this.options.langPrefix + escape(lang, true));
- }
-
- return 'pre(class="' + cssClasses.join(' ') + '")\n' + indentString('code.\n', ' ', 2) + trimmedCode;
- };
-
- renderer.heading = function (text, level, raw) {
- var headingText = marked.Renderer.prototype.heading.call(renderer, text, level, raw);
- var title = 'h2 ' + stripTags(headingText);
-
- if (level==2) {
- title = '.l-main-section\n' + indentString(title, ' ', 2) ;
- }
-
- return title;
- };
-
- return function(content) {
- return marked(content, { renderer: renderer });
- };
-};
\ No newline at end of file
diff --git a/docs/angular.io-package/templates/class.template.html b/docs/angular.io-package/templates/class.template.html
deleted file mode 100644
index a51fc5fb08b8c..0000000000000
--- a/docs/angular.io-package/templates/class.template.html
+++ /dev/null
@@ -1,62 +0,0 @@
-{% include "lib/githubLinks.html" -%}
-{% include "lib/paramList.html" -%}
-{% extends 'layout/base.template.html' -%}
-
-{% block body %}
-p.location-badge.
- exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }
- defined in {$ githubViewLink(doc) $}
-
-:markdown
-{$ doc.moduleDoc.description | indent(2, true) | trimBlankLines $}
-
-{%- if doc.decorators %}
-.l-main-section
- h2 Annotations
-{%- for decorator in doc.decorators %}
- .l-sub-section
- h3.annotation {$ decorator.name $}
- pre.prettyprint
- code.
- @{$ decorator.name $}{$ paramList(decorator.arguments) | indent(8, false) $}
-{% endfor %}
-{% endif -%}
-
-
-{%- if doc.constructorDoc or doc.members.length -%}
-.l-main-section
- h2 Members
-
-{%- if doc.constructorDoc %}
- .l-sub-section
- h3 {$ doc.constructorDoc.name $}
-
- {% if doc.constructorDoc.parameters %}
- pre.prettyprint
- code.
- {$ doc.constructorDoc.name $}{$ paramList(doc.constructorDoc.parameters) | indent(8, false) | trim $}
- {% endif %}
- :markdown
-{$ doc.constructorDoc.description | indent(6, true) | replace('## Example', '') | replace('# Example', '') | trimBlankLines $}
-
-
-{% endif -%}
-
-{%- for member in doc.members %}{% if not member.private %}
- .l-sub-section
- h3 {$ member.name $}{% if member.optional %}?{% endif %}
-
- {% if member.parameters %}
- pre.prettyprint
- code.
- {$ member.name $}{$ paramList(member.parameters) | indent(8, false) | trim $}{$ returnType(doc.returnType) $}
- {% endif %}
- :markdown
-{$ member.description | indent(6, true) | replace('## Example', '') | replace('# Example', '') | trimBlankLines $}
-
-
-
-{% endif %}{% endfor %}
-{%- endif -%}
-
-{% endblock %}
diff --git a/docs/angular.io-package/templates/enum.template.html b/docs/angular.io-package/templates/enum.template.html
deleted file mode 100644
index 9c59159b296ae..0000000000000
--- a/docs/angular.io-package/templates/enum.template.html
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'class.template.html' -%}
\ No newline at end of file
diff --git a/docs/angular.io-package/templates/function.template.html b/docs/angular.io-package/templates/function.template.html
deleted file mode 100644
index 5136a35021cf6..0000000000000
--- a/docs/angular.io-package/templates/function.template.html
+++ /dev/null
@@ -1,22 +0,0 @@
-{% include "lib/githubLinks.html" -%}
-{% include "lib/paramList.html" -%}
-{% extends 'layout/base.template.html' -%}
-
-{% block body %}
-.l-main-section
- h2(class="function export") {$ doc.name $}
-
- {% if doc.parameters %}
- pre.prettyprint
- code.
- {$ doc.name $}{$ paramList(doc.parameters) | indent(4, true) | trim $}{$ returnType(doc.returnType) $}
- {% endif %}
-
- p.location-badge.
- exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }
- defined in {$ githubViewLink(doc) $}
-
- :markdown
-{$ doc.description | indent(4, true) | trimBlankLines $}
-
-{% endblock %}
\ No newline at end of file
diff --git a/docs/angular.io-package/templates/jade-data.template.html b/docs/angular.io-package/templates/jade-data.template.html
deleted file mode 100644
index fcafb63db7b14..0000000000000
--- a/docs/angular.io-package/templates/jade-data.template.html
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-{%- for item in doc.data %}
- "{$ item.name $}" : {
- "title" : "{$ item.title $}"{% if item.intro %},
- "intro" : "{$ item.intro $}"{% endif %}
- }{% if not loop.last %},{% endif %}
-{% endfor -%}
-}
\ No newline at end of file
diff --git a/docs/angular.io-package/templates/layout/base.template.html b/docs/angular.io-package/templates/layout/base.template.html
deleted file mode 100644
index 16a0d9dc96f07..0000000000000
--- a/docs/angular.io-package/templates/layout/base.template.html
+++ /dev/null
@@ -1 +0,0 @@
-{% block body %}{% endblock %}
\ No newline at end of file
diff --git a/docs/angular.io-package/templates/lib/paramList.html b/docs/angular.io-package/templates/lib/paramList.html
deleted file mode 100644
index 24ba12c080b72..0000000000000
--- a/docs/angular.io-package/templates/lib/paramList.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{% macro paramList(params) -%}
- {%- if params -%}
- ({%- for param in params -%}
- {$ param | escape $}{% if not loop.last %}, {% endif %}
- {%- endfor %})
- {%- endif %}
-{%- endmacro -%}
-
-
-{% macro returnType(returnType) -%}
- {%- if returnType %} : {$ returnType | escape $}{% endif -%}
-{%- endmacro -%}
diff --git a/docs/angular.io-package/templates/module.template.html b/docs/angular.io-package/templates/module.template.html
deleted file mode 100644
index 3fbe568783d3d..0000000000000
--- a/docs/angular.io-package/templates/module.template.html
+++ /dev/null
@@ -1,15 +0,0 @@
-{% include "lib/githubLinks.html" -%}
-{% extends 'layout/base.template.html' -%}
-{% block body -%}
-p.location-badge.
- defined in {$ githubViewLink(doc) $}
-
-ul
- for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
- if slug != 'index'
- - var url = "/docs/" + current.path[1] + "/" + current.path[2] + "/" + current.path[3] + "/" + current.path[4] + "/" + slug + ".html"
-
- li.c8
- != partial("../../../../../_includes/_hover-card", {name: page.title, url: url })
-
-{% endblock %}
\ No newline at end of file
diff --git a/docs/angular.io-package/templates/var.template.html b/docs/angular.io-package/templates/var.template.html
deleted file mode 100644
index 72aa66ecfd22b..0000000000000
--- a/docs/angular.io-package/templates/var.template.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{% include "lib/githubLinks.html" -%}
-{% extends 'layout/base.template.html' %}
-
-{% block body %}
-.l-main-section
- p.location-badge.
- exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }
- defined in {$ githubViewLink(doc) $}
-
- :markdown
-{$ doc.description | indent(4, true) | trimBlankLines $}
-{% endblock %}
diff --git a/docs/app/css/app.css b/docs/app/css/app.css
deleted file mode 100644
index ac23dd0c82d9b..0000000000000
--- a/docs/app/css/app.css
+++ /dev/null
@@ -1,379 +0,0 @@
-
-.hide { display: none !important; }
-
-body {
- overflow: hidden;
- max-width: 100%;
- max-height: 100%;
- font-size: 14px;
-}
-
-a {
- color: #3f51b5;
-}
-
-table {
- margin-bottom: 20px;
- max-width: 100%;
- width: 100%;
- border-spacing: 0;
- border-collapse: collapse;
- background-color: transparent;
-}
-
-td,
-th {
- padding: $baseline-grid ($baseline-grid * 2);
- border-top: 1px solid #ddd;
- vertical-align: top;
-}
-
-th {
- border-bottom: 2px solid #ddd;
- vertical-align: bottom;
-}
-
-pre {
- white-space: pre;
- white-space: pre-wrap;
- word-wrap: break-word;
-}
-
-.md-sidenav-inner {
- background: #fff;
-}
-
-.layout-content,
-.doc-content {
- max-width: 864px;
- margin: auto;
-}
-.layout-label {
- width: 120px;
-}
-.layout-content code.highlight {
- margin-bottom: 15px;
-}
-
-.menu-item {
- background: none;
- border-width: 0;
- cursor: pointer;
- display: block;
- color: #333;
- font-size: inherit;
- line-height: 40px;
- max-height: 40px;
- opacity: 1;
- margin: 0;
- outline: none;
- padding: 0px 28px;
- position: relative;
- text-align: left;
- text-decoration: none;
- width: 100%;
- z-index: 1;
- -webkit-transition: 0.45s cubic-bezier(0.35, 0, 0.25, 1);
- -webkit-transition-property: max-height, background-color, opacity;
- -moz-transition: 0.45s cubic-bezier(0.35, 0, 0.25, 1);
- -moz-transition-property: max-height, background-color, opacity;
- transition: 0.45s cubic-bezier(0.35, 0, 0.25, 1);
- transition-property: max-height, background-color, opacity;
-}
-.menu-item.ng-hide {
- max-height: 0;
- opacity: 0;
-}
-.menu-item:hover {
- color: #999;
-}
-.menu-item:focus {
- font-weight: bold;
-}
-.menu-item.menu-title {
- color: #888;
- font-size: 14px;
- padding-left: 16px;
- text-align: left;
- text-transform: uppercase;
- transition: color 0.35s cubic-bezier(0.35, 0, 0.25, 1);
-}
-.menu-item.menu-title:hover,
-.menu-item.menu-title.active {
- color: #1976d2;
-}
-
-.menu-icon {
- background: none;
- border: none;
-}
-.app-toolbar .md-toolbar-tools h3 {
- -webkit-margin-before: 0;
- -webkit-margin-after: 0;
-}
-
-.demo-container {
- border-radius: 4px;
- margin-top: 16px;
- -webkit-transition: 0.02s padding cubic-bezier(0.35, 0, 0.25, 1);
- transition: 0.02s padding cubic-bezier(0.35, 0, 0.25, 1);
- position: relative;
- padding-bottom: 0;
-}
-.demo-source-tabs {
- z-index: 1;
- -webkit-transition: all 0.45s cubic-bezier(0.35, 0, 0.25, 1);
- transition: all 0.45s cubic-bezier(0.35, 0, 0.25, 1);
- max-height: 448px;
- min-height: 448px;
- background: #fff;
- overflow: hidden;
-}
-
-md-tabs.demo-source-tabs md-tab,
-md-tabs.demo-source-tabs .md-header {
- background-color: #444444 !important;
-}
-
-
-md-tabs.demo-source-tabs md-tab-label {
- color: #ccc !important;
-}
-
-md-tabs.demo-source-tabs .active md-tab-label {
- color: #fff !important;
-}
-
-.demo-source-tabs.ng-hide {
- max-height: 0px;
- min-height: 0px;
-}
-.demo-source-tabs {
- position: relative;
- width: 100%;
- z-index: 0;
-}
-.demo-content {
- position: relative;
- overflow:hidden;
- min-height: 448px;
- display: -webkit-box;
- display: -webkit-flex;
- display: -moz-box;
- display: -moz-flex;
- display: -ms-flexbox;
- display: flex;
-}
-.small-demo .demo-source-tabs:not(.ng-hide) {
- min-height: 224px;
- max-height: 224px;
-}
-.small-demo .demo-content {
- min-height: 128px;
-}
-.demo-content > * {
- -webkit-box-flex: 1;
- -webkit-flex: 1;
- -moz-box-flex: 1;
- -moz-flex: 1;
- -ms-flex: 1;
- flex: 1;
-}
-
-.demo-content > div[layout-fill] {
- min-height: 448px;
-}
-.small-demo .demo-content > div[layout-fill] {
- min-height: 224px;
-}
-.small-demo .demo-toolbar,
-.small-demo .md-toolbar-tools {
- min-height: 48px;
- max-height: 48px;
- font-size: 20px;
-}
-
-.show-source md-toolbar.demo-toolbar {
- box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.36);
-}
-.demo-toolbar .md-button {
- color: #616161;
-}
-
-md-toolbar.demo-toolbar,
-.demo-source-tabs md-tab,
-.demo-source-tabs .tabs-header {
- background: #E0E0E0 !important;
- color: #616161;
-}
-md-toolbar.demo-toolbar md-tab-label {
- color: #99E4EE
-}
-md-toolbar.demo-toolbar .md-button:hover,
-md-toolbar.demo-toolbar .md-button:focus,
-md-toolbar.demo-toolbar .md-button.active {
- background: rgba(0,0,0,0.1);
-}
-
-md-toolbar.demo-toolbar .md-button {
- -webkit-transition: all 0.3s linear;
- -moz-transition: all 0.3s linear;
- transition: all 0.3s linear;
-}
-.demo-source-container {
- display: block;
- border: 1px solid #ddd;
- background-color: #f6f6f6;
- height: 400px;
-}
-
-.demo-source-content {
- height: 400px;
-}
-.demo-source-content,
-.demo-source-content pre,
-.demo-source-content code {
- background: #f6f6f6;
- font-family: monospace;
-}
-.demo-source-content pre {
- max-width: 100%;
- overflow-wrap: break-word;
-}
-
-.show-source div[demo-include] {
- border-top: #ddd solid 2px;
-}
-
-
-.menu-separator-icon {
- margin: 0;
-}
-.menu-module-name {
- opacity: 0.6;
- font-size: 18px;
-}
-
-/************
- * DOCS
- ************/
-.api-options-bar .md-button {
- margin: 4px;
- padding: 4px;
-}
-.api-options-bar .md-button:hover,
-.api-options-bar .md-button:focus {
- background: rgba(0, 0, 0, 0.2);
-}
-.api-options-bar.with-icon md-icon {
- position: absolute;
- top: -3px;
- left: 2px;
-}
-.api-options-bar.with-icon .md-button span {
- margin-left: 22px;
-}
-
-.api-params-item {
- min-height: 72px;
- border-bottom: 1px solid #ddd;
-}
-.api-params-label {
- margin-right: 8px;
- text-align: center;
- margin-top: 14px;
- -webkit-align-self: flex-start;
- -moz-align-self: flex-start;
- -ms-flex-item-align: start;
- align-self: flex-start;
-}
-.api-params-title {
- color: #888;
-}
-code.api-type {
- font-weight: bold;
-}
-
-ul {
- margin: 0;
-}
-ul li {
- margin-top: 3px;
- list-style-position: inside;
-}
-ul li:first-child {
- margin-top: 0;
-}
-
-.layout-title {
- color: #999999;
- font-size: 14px;
- font-weight: bold;
- text-transform: uppercase;
-}
-
-.api-params-content ul {
- padding-left: 4px;
-}
-ul.methods > li {
- margin-bottom: 48px;
-}
-
-ul.methods .method-function-syntax {
- font-weight: normal;
- font-size: 20px;
- margin: 0;
- -webkit-margin-before: 0;
- -webkit-margin-after: 0;
-}
-ul.methods li h3 {
- /* border-bottom: 1px solid #eee; */
-}
-
-@media (max-width: 600px) {
- ul.methods > li {
- padding-left: 0;
- border-left: none;
- list-style: default;
- }
- ul.methods .method-function-syntax {
- font-size: 14px;
- }
-}
-
-.version {
- padding-left: 10px;
- text-decoration: underline;
- font-size: 0.95em;
-}
-
-.demo-source-container pre,
-.demo-source-container code {
- min-height: 100%;
-}
-
-md-content.demo-source-container > hljs > pre > code.highlight {
- position : absolute;
- top : 0px;
- left: 0px;
- right: 0px;
-}
-
-
-.extraPad {
- padding-left:32px !important;
- padding-right:32px !important;
-}
-
-
-.member .name {
- white-space: pre-wrap;
- word-wrap: break-word;
- font-family: monospace;
- font-size: 1.17em;
- margin: 1em 0;
-}
-
-.left-nav {
- min-width: 300px;
-}
\ No newline at end of file
diff --git a/docs/app/css/prettify-theme.css b/docs/app/css/prettify-theme.css
deleted file mode 100644
index 7308e1ec719f7..0000000000000
--- a/docs/app/css/prettify-theme.css
+++ /dev/null
@@ -1,142 +0,0 @@
-/* GitHub Theme */
-.prettyprint {
- background: white;
- font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace;
- font-size: 12px;
- line-height: 1.5;
-}
-
-.lang-text * {
- color: #333333!important;
-}
-
-.pln {
- color: #333333;
-}
-
-@media screen {
- .str {
- color: #dd1144;
- }
-
- .kwd {
- color: #333333;
- }
-
- .com {
- color: #999988;
- }
-
- .typ {
- color: #445588;
- }
-
- .lit {
- color: #445588;
- }
-
- .pun {
- color: #333333;
- }
-
- .opn {
- color: #333333;
- }
-
- .clo {
- color: #333333;
- }
-
- .tag {
- color: navy;
- }
-
- .atn {
- color: teal;
- }
-
- .atv {
- color: #dd1144;
- }
-
- .dec {
- color: #333333;
- }
-
- .var {
- color: teal;
- }
-
- .fun {
- color: #990000;
- }
-}
-@media print, projection {
- .str {
- color: #006600;
- }
-
- .kwd {
- color: #006;
- font-weight: bold;
- }
-
- .com {
- color: #600;
- font-style: italic;
- }
-
- .typ {
- color: #404;
- font-weight: bold;
- }
-
- .lit {
- color: #004444;
- }
-
- .pun, .opn, .clo {
- color: #444400;
- }
-
- .tag {
- color: #006;
- font-weight: bold;
- }
-
- .atn {
- color: #440044;
- }
-
- .atv {
- color: #006600;
- }
-}
-/* Specify class=linenums on a pre to get line numbering */
-ol.linenums {
- margin-top: 0;
- margin-bottom: 0;
-}
-
-/* IE indents via margin-left */
-li.L0,
-li.L1,
-li.L2,
-li.L3,
-li.L4,
-li.L5,
-li.L6,
-li.L7,
-li.L8,
-li.L9 {
- /* */
-}
-
-/* Alternate shading for lines */
-li.L1,
-li.L3,
-li.L5,
-li.L7,
-li.L9 {
- /* */
-}
diff --git a/docs/app/index.html b/docs/app/index.html
deleted file mode 100644
index 3bfb05b69e3c9..0000000000000
--- a/docs/app/index.html
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
- Angular 2 Docs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -255,11 +232,11 @@ are always in the form of `property-name` which is assigned an `expression`. The
Short form
-
``
+
<some-element [some-property]="expression">
Canonical form
-
``
+
<some-element bind-some-property="expression">
@@ -282,7 +259,7 @@ Key points:
* The binding is to the element property not the element attribute.
* To prevent custom element from accidentally reading the literal `expression` on the title element, the attribute name
is escaped. In our case the `title` is escaped to `[title]` through the addition of square brackets `[]`.
-* A binding value (in this case `user.firstName` will always be an expression, never a string literal).
+* A binding value (in this case `user.firstName`) will always be an expression, never a string literal.
NOTE: Unlike Angular v1, Angular v2 binds to properties of elements rather than attributes of elements. This is
done to better support custom elements, and to allow binding for values other than strings.
@@ -304,7 +281,7 @@ syntax which is just a short hand for the data binding syntax.
is a short hand for:
```
-_
+
```
The above says to bind the `'Hello ' + stringify(name) + '!'` expression to the zero-th child of the `span`'s `text`
@@ -344,25 +321,25 @@ Views than can be inserted and removed as needed to change the DOM structure.
@@ -420,7 +397,7 @@ of the templates occurs. One such example is `ng-for`.
Where:
* `[ng-for]` triggers the for directive.
-* `#person` exports the implicit `ng-for` item.
+* `#person` exports the implicit `ng-for` item.
* `[ng-for-of]="people"` binds an iterable object to the `ng-for` controller.
* `#i=index` exports item index as `i`.
@@ -475,7 +452,7 @@ microsyntax: ([[key|keyExpression|varExport][;|,]?)*
```
Where
-* `expression` is an Angular expression as defined in section: Expressions
+* `expression` is an Angular expression as defined in section: Expressions.
* `local` is a local identifier for local variables.
* `internal` is an internal variable which the directive exports for binding.
* `key` is an attribute name usually only used to trigger a specific directive.
@@ -500,11 +477,11 @@ Binding events allows wiring events from DOM (or other components) to the Angula
Short form
-
``
+
<some-element (some-event)="statement">
Canonical form
-
``
+
<some-element on-some-event="statement">
@@ -515,18 +492,16 @@ Where:
* `statement` is a valid statement (as defined in section below).
If the execution of the statement returns `false`, then `preventDefault`is applied on the DOM event.
-By default, angular only listens to the element on the event, and ignores events which bubble. To listen to bubbled
-events (as in the case of clicking on any child) use the bubble option (`(event)` or `on-bubble-event`) as shown
-below.
+Angular listens to bubbled DOM events (as in the case of clicking on any child), as shown below:
Short form
-
``
+
<some-element (some-event)="statement">
Canonical form
-
``
+
<some-element on-some-event="statement">
@@ -548,7 +523,7 @@ component's controller.
NOTE: Unlike Angular v1, Angular v2 treats event bindings as core constructs not as directives. This means that there
-is no need to create a event directive for each kind of event. This makes it possible for Angular v2 to easily
+is no need to create an event directive for each kind of event. This makes it possible for Angular v2 to easily
bind to custom events of Custom Elements, whose event names are not known ahead of time.
@@ -563,7 +538,7 @@ have different semantics.
### Expressions
Expressions can be used to bind to properties only. Expressions represent how data should be projected to the View.
-Expressions should not have any side effects and should be idempotent. Examples of where expressions can be used in
+Expressions should not have any side effect and should be idempotent. Examples of where expressions can be used in
Angular are:
```
{{expression}}
diff --git a/modules/angular2/docs/core/02_directives.md b/modules/angular2/docs/core/02_directives.md
index 9b16ecd3327b1..0b5b1d6b8e682 100644
--- a/modules/angular2/docs/core/02_directives.md
+++ b/modules/angular2/docs/core/02_directives.md
@@ -67,14 +67,14 @@ Here is a trivial example of a tooltip decorator. The directive will log a toolt
'text: tooltip' | - DOM element tooltip property should be
], | mapped to the directive text property.
host: { | List which events need to be mapped.
- '(mouseover)': 'show()' | - Invoke the show() method every time
+ '(mouseover)': 'show()' | - Invoke the show() method every time
} | the mouseover event is fired.
}) |
class Form { | Directive controller class, instantiated
| when CSS matches.
text:string; | text property on the Directive Controller.
|
- show(event) { | Show method which implements the show action.
+ show() { | Show method which implements the show action.
console.log(this.text); |
}
}
diff --git a/modules/angular2/docs/di/di.md b/modules/angular2/docs/di/di.md
index 5985676dbde8e..5d34efa93697a 100644
--- a/modules/angular2/docs/di/di.md
+++ b/modules/angular2/docs/di/di.md
@@ -108,7 +108,7 @@ while (inj) {
inj = inj.parent;
}
}
-throw new NoBindingError(requestedKey);
+throw new NoProviderError(requestedKey);
```
So in the following example
@@ -160,7 +160,7 @@ var child = parent.resolveAndCreateChild([
bind(Engine).toClass(TurboEngine)
]);
-parent.get(Car); // will throw NoBindingError
+parent.get(Car); // will throw NoProviderError
```
@@ -218,7 +218,7 @@ The `someFactory` function does not have to know that it creates an object for `
### Resolved Bindings
-When DI receives `bind(Car).toClass(Car)`, it needs to do a few things before before it can create an instance of `Car`:
+When DI receives `bind(Car).toClass(Car)`, it needs to do a few things before it can create an instance of `Car`:
- It needs to reflect on `Car` to create a factory function.
- It needs to normalize the dependencies (e.g., calculate lower and upper bounds).
diff --git a/modules/angular2/docs/web_workers/web_workers.md b/modules/angular2/docs/web_workers/web_workers.md
new file mode 100644
index 0000000000000..82acf99a418f3
--- /dev/null
+++ b/modules/angular2/docs/web_workers/web_workers.md
@@ -0,0 +1,476 @@
+# WebWorkers in Angular 2: Documentation
+
+Angular 2 includes native support for writing applications which live in a
+WebWorker. This document describes how to write applications that take advantage
+of this feature.
+It also provides a detailed description of the underlying messaging
+infrastructure that angular uses to communicate between the main process and the
+worker. This infrastructure can be modified by an application developer to
+enable driving an angular 2 application from an iFrame, different window / tab,
+server, etc..
+
+## Introduction
+WebWorker support in Angular2 is designed to make it easy to leverage parallelization in your web application.
+When you choose to run your application in a WebWorker angular runs both your application's logic and the
+majority of the core angular framework in a WebWorker.
+By offloading as much code as possible to the WebWorker we keep the UI thread
+free to handle events, manipulate the DOM, and run animations. This provides a
+better framerate and UX for applications.
+
+## Bootstrapping a WebWorker Application
+Bootstrapping a WebWorker application is not much different than bootstrapping a normal application.
+The primary difference is that you don't pass your root component directly to ```bootstrap```.
+Instead you pass the name of a background script that calls ```bootstrapWebWorker``` with your root component.
+
+### Example
+To bootstrap Hello World in a WebWorker we do the following in TypeScript
+```HTML
+
+
+
+
+
+
+
+
+
+
+
+```
+```TypeScript
+// index.js
+import {bootstrap} from "angular2/web_worker/ui";
+bootstrap("loader.js");
+```
+```JavaScript
+// loader.js
+importScripts("https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.js", "https://jspm.io/system@0.16.js", "angular2/web_worker/worker.js");
+System.import("app");
+```
+```TypeScript
+// app.ts
+import {Component, View, bootstrapWebWorker} from "angular2/web_worker/worker";
+@Component({
+ selector: "hello-world"
+})
+@View({
+ template: "
Hello {{name}}
+})
+export class HelloWorld {
+ name: string = "Jane";
+}
+
+bootstrapWebWorker(HelloWorld);
+```
+There's a few important things to note here:
+* On the UI side we import all angular types from `angular2/web_worker/ui` and on the worker side we import from
+`angular2/web_worker/worker`. These modules include all the typings in the WebWorker bundle. By importing from
+these URLs instead of `angular2/angular2` we can statically ensure that our app does not reference a type that
+doesn't exist in the context it's mean to execute in. For example, if we tried to import DomRenderer in the Worker
+or NgFor on the UI we would get a compiler error.
+* The UI loads angular from the file `angular2/web_worker/ui.js` and the Worker loads angular from
+`angular2/web_worker/worker.js`. These bundles are created specifically for using WebWorkers and should be used
+instead of the normal angular2.js file. Both files contain subsets of the angular2 codebase that is designed to
+run specifically on the UI or Worker. Additionally, they contain the core messaging infrastructure used to
+communicate between the Worker and the UI. This messaging code is not in the standard angular2.js file.
+* We pass `loader.js` to bootstrap and not `app.ts`. You can think of `loader.js` as the `index.html` of the
+Worker. Since WebWorkers share no memory with the UI we need to reload the angular2 dependencies before
+bootstrapping our application. We do this with importScripts. Additionally, we need to do this in a different
+file than `app.ts` because our module loader (System.js in this example) has not been loaded yet, and `app.ts`
+will be compiled with a System.define call at the top.
+* The HelloWorld Component looks exactly like a normal Angular2 HelloWorld Component! The goal of WebWorker
+support was to allow as much of Angular to live in the worker as possible.
+As such, *most* angular2 components can be bootstrapped in a WebWorker with minimal to no changes required.
+
+For reference, here's the same HelloWorld example in Dart.
+```HTML
+
+
+
+
+
+
+```
+```Dart
+// index.dart
+import "package:angular2/web_worker/ui.dart";
+import "package:angular2/src/core/reflection/reflection.dart";
+import "package:angular2/src/core/reflection/reflection_capabilities.dart";
+
+main() {
+ reflector.reflectionCapabilities = new ReflectionCabilities();
+ bootstrap("app.dart");
+}
+```
+```Dart
+import "package:angular2/web_worker/worker.dart";
+import "package:angular2/src/core/reflection/reflection.dart";
+import "package:angular2/src/core/reflection/reflection_capabilities.dart";
+
+@Component(
+ selector: "hello-world"
+)
+@View(
+ template: "
Hello {{name}}
"
+)
+class HelloWorld {
+ String name = "Jane";
+}
+
+main(List args, SendPort replyTo) {
+ reflector.reflectionCapabilities = new ReflectionCapabilities();
+ bootstrapWebWorker(replyTo, HelloWorld);
+}
+
+```
+This code is nearly the same as the TypeScript version with just a couple key differences:
+* We don't have a `loader.js` file. Dart applications don't need this file because you don't need a module loader.
+* We pass a `SendPort` to `bootstrapWebWorker`. Dart applications use the Isolate API, which communicates via
+Dart's Port abstraction. When you call `bootstrap` from the UI thread, angular starts a new Isolate to run
+your application logic. When Dart starts a new Isolate it passes a `SendPort` to that Isolate so that it
+can communicate with the Isolate that spawned it. You need to pass this `SendPort` to `bootstrapWebWorker`
+so that Angular can communicate with the UI.
+* You need to set up `ReflectionCapabilities` on both the UI and Worker. Just like writing non-concurrent
+Angular2 Dart applications you need to set up the reflector. You should not use Reflection in production,
+but should use the angular 2 transformer to remove it in your final JS code. Note there's currently a bug
+with running the transformer on your UI code (#3971). You can (and should) pass the file where you call
+`bootstrapWebWorker` as an entry point to the transformer, but you should not pass your UI index file
+to the transformer until that bug is fixed.
+
+## Writing WebWorker Compatible Components
+You can do almost everything in a WebWorker component that you can do in a typical Angular 2 Component.
+The main exception is that there is **no** DOM access from a WebWorker component. In Dart this means you can't
+import anything from `dart:html` and in JavaScript it means you can't use `document` or `window`. Instead you
+should use data bindings and if needed you can inject the `Renderer` along with your component's `ElementRef`
+directly into your component and use methods such as `setElementProperty`, `setElementAttribute`,
+`setElementClass`, `setElementStyle`, `invokeElementMethod`, and `setText`. Not that you **cannot** call
+`getNativeElementSync`. Doing so will always return `null` when running in a WebWorker.
+If you need DOM access see [Running Code on the UI](#running-code-on-the-ui).
+
+## WebWorker Design Overview
+When running your application in a WebWorker, the majority of the angular core along with your application logic
+runs on the worker. The two main components that run on the UI are the `Renderer` and the `RenderCompiler`. When
+running angular in a WebWorker the bindings for these two components are replaced by the `WebWorkerRenderer` and
+the `WebWorkerRenderCompiler`. When these components are used at runtime, they pass messages through the
+[MessageBroker](#messagebroker) instructing the UI to run the actual method and return the result. The
+[MessageBroker](#messagebroker) abstraction allows either side of the WebWorker boundary to schedule code to run
+on the opposite side and receive the result. You can use the [MessageBroker](#messagebroker)
+Additionally, the [MessageBroker](#messagebroker) sits on top of the [MessageBus](#messagebus).
+MessageBus is a low level abstraction that provides a language agnostic API for communicating with angular components across any runtime boundary such as `WebWorker <--> UI` communication, `UI <--> Server` communication,
+or `Window <--> Window` communication.
+
+See the diagram below for a high level overview of how this code is structured:
+
+![WebWorker Diagram](http://stanford.edu/~jteplitz/ng_2_worker.png)
+
+## Running Code on the UI
+If your application needs to run code on the UI, there are a few options. The easiest way is to use a
+CustomElement in your view. You can then register this custom element from your html file and run code in response
+to the element's lifecycle hooks. Note, Custom Elements are still experimental. See
+[MDN](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Custom_Elements) for the latest details on how
+to use them.
+
+If you require more robust communication between the WebWorker and the UI you can use the [MessageBroker](#using-the-messagebroker-in-your-application) or
+[MessageBus](#using-the-messagebus-in-your-application) directly.
+
+## MessageBus
+The MessageBus is a low level abstraction that provides a language agnostic API for communicating with angular components across any runtime boundary. It supports multiplex communication through the use of a channel
+abstraction.
+
+Angular currently includes two stable MessageBus implementations, which are used by default when you run your
+application inside a WebWorker.
+
+1. The `PostMessageBus` is used by JavaScript applications to communicate between a WebWorker and the UI.
+2. The `IsolateMessageBus` is used by Dart applications to communicate between a background Isolate and the UI.
+
+Angular also includes three experimental MessageBus implementations:
+
+1. The `WebSocketMessageBus` is a Dart MessageBus that lives on the UI and communicates with an angular
+application running on a server. It's intended to be used with either the `SingleClientServerMessageBus` or the
+`MultiClientServerMessageBus`.
+2. The `SingleClientServerMessageBus` is a Dart MessageBus that lives on a Dart Server. It allows an angular
+application to run on a server and communicate with a single browser that's running the `WebSocketMessageBus`.
+3. The `MultiClientServerMessageBus` is like the `SingleClientServerMessageBus` except it allows an arbitrary
+number of clients to connect to the server. It keeps all connected browsers in sync and if an event fires in
+any connected browser it propagates the result to all connected clients. This can be especially useful as a
+debugging tool, by allowing you to connect multiple browsers / devices to the same angular application,
+change the state of that application, and ensure that all the clients render the view correctly. Using these tools
+can make it easy to catch tricky browser compatibility issues.
+
+### Using the MessageBus in Your Application
+**Note**: If you want to pass custom messages between the UI and WebWorker, it's recommended you use the
+[MessageBroker](#using-the-messagebroker-in-your-application). However, if you want to control the messaging
+protocol yourself you can use the MessageBus directly.
+
+To use the MessageBus you need to initialize a new channel on both the UI and WebWorker.
+In TypeScript that would look like this:
+```TypeScript
+// index.ts, which is running on the UI.
+var instance = bootstrap("loader.js");
+var bus = instance.bus;
+bus.initChannel("My Custom Channel");
+```
+```TypeScript
+// background_index.ts, which is running on the WebWorker
+import {MessageBus} from 'angular2/web_worker/worker';
+@Component({...})
+@View({...})
+export class MyComponent {
+ constructor (bus: MessageBus) {
+ bus.initChannel("My Custom Channel");
+ }
+}
+```
+
+Once the channel has been initialized either side can use the `from` and `to` methods on the MessageBus to send
+and receive messages. Both methods return EventEmitter. Expanding on the example from earlier:
+```TypeScript
+// index.ts, which is running on the UI.
+import {bootstrap} from 'angukar2/web_worker/ui';
+var instance = bootstrap("loader.js");
+var bus = instance.bus;
+bus.initChannel("My Custom Channel");
+bus.to("My Custom Channel").next("hello from the UI");
+```
+```TypeScript
+// background_index.ts, which is running on the WebWorker
+import {MessageBus, Component, View} from 'angular2/web_worker/worker';
+@Component({...})
+@View({...})
+export class MyComponent {
+ constructor (bus: MessageBus) {
+ bus.initChannel("My Custom Channel");
+ bus.from("My Custom Channel").observer((message) => {
+ console.log(message); // will print "hello from the UI"
+ });
+ }
+}
+```
+
+This example is nearly identical in Dart, and is included below for reference:
+```Dart
+// index.dart, which is running on the UI.
+import 'package:angular2/web_workers/ui.dart';
+
+main() {
+ var instance = bootstrap("background_index.dart");
+ var bus = instance.bus;
+ bus.initChannel("My Custom Channel");
+ bus.to("My Custom Channel").add("hello from the UI");
+}
+
+```
+```Dart
+// background_index.dart, which is running on the WebWorker
+import 'package:angular2/web_worker/worker.dart';
+@Component(...)
+@View(...)
+class MyComponent {
+ MyComponent (MessageBus bus) {
+ bus.initChannel("My Custom Channel");
+ bus.from("My Custom Channel").listen((message) {
+ print(message); // will print "hello from the UI"
+ });
+ }
+}
+```
+The only substantial difference between these APIs in Dart and TypeScript is the different APIs for the
+`EventEmitter`.
+
+**Note** Because the messages passed through the MessageBus cross a WebWorker boundary, they must be serializable.
+If you use the MessageBus directly, you are responsible for serializing your messages.
+In JavaScript / TypeScript this means they must be serializable via JavaScript's
+[structured cloning algorithim](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
+
+In Dart this means they must be valid messages that can be passed through a
+[SendPort](https://api.dartlang.org/1.12.1/dart-isolate/SendPort/send.html).
+
+
+### MessageBus and Zones
+The MessageBus API includes support for [zones](http://www.github.com/angular/zone.js).
+A MessageBus can be attached to a specific zone (by calling `attachToZone`). Then specific channels can be
+specified to run in the zone when they are initialized.
+If a channel is running in the zone, that means that any events emitted from that channel will be executed within
+the given zone. For example, by default angular runs the EventDispatch channel inside the angular zone. That means
+when an event is fired from the DOM and received on the WebWorker the event handler automatically runs inside the
+angular zone. This is desired because after the event handler exits we want to exit the zone so that we trigger
+change detection. Generally, you want your channels to run inside the zone unless you have a good reason for why
+they need to run outside the zone.
+
+### Implementing and Using a Custom MessageBus
+**Note** Implementing and using a Custom MesageBus is experimental and requires importing from private APIs.
+
+If you want to drive your application from something other than a WebWorker you can implement a custom message
+bus. Implementing a custom message bus just means creating a class that fulfills the API specified by the
+abstract MessageBus class.
+
+If you're implementing your MessageBus in Dart you can extend the `GenericMessageBus` class included in angular.
+if you do this, you don't need to implement zone or channel support yourself. You only need to implement a
+`MessageBusSink` that extends `GenericMessageBusSink` and a `MessageBusSource` that extends
+`GenericMessageBusSource`. The `MessageBusSink` must override the `sendMessages` method. This method is
+given a list of serialized messages that it is required to send through the sink.
+The `MessageBusSource` needs to provide a [Stream](https://api.dartlang.org/1.12.1/dart-async/Stream-class.html)
+of incoming messages (either by passing the stream to `GenericMessageBusSource's` constructor or by calling
+attachTo() with the stream). It also needs to override the abstract `decodeMessages` method. This method is
+given a List of serialized messages received by the source and should perform any decoding work that needs to be
+done before the application can read the messages.
+
+For example, if your MessageBus sends and receives JSON data you would do the following:
+```Dart
+import 'package:angular2/src/web_workers/shared/generic_message_bus.dart';
+import 'dart:convert';
+
+class JsonMessageBusSink extends GenericMessageBusSink {
+ @override
+ void sendMessages(List messages) {
+ String encodedMessages = JSON.encode(messages);
+ // Send encodedMessages here
+ }
+}
+
+class JsonMessageBusSource extends GenericMessageBuSource {
+ JsonMessageBusSource(Stream incomingMessages) : super (incomingMessages);
+
+ @override
+ List decodeMessages(dynamic messages) {
+ return JSON.decode(messages);
+ }
+}
+```
+
+Once you've implemented your custom MessageBus in either TypeScript or Dart you can tell angular to use it like
+so:
+In TypeScript:
+```TypeScript
+// index.ts, running on the UI side
+import {bootstrapUICommon} from 'angular2/src/web_workers/ui/impl';
+var bus = new MyAwesomeMessageBus();
+bootstrapUICommon(bus);
+```
+```TypeScript
+// background_index.ts, running on the application side
+import {bootstrapWebWorkerCommon} from 'angular2/src/web_workers/worker/application_common';
+import {MyApp} from './app';
+var bus = new MyAwesomeMessageBus();
+bootstrapWebWorkerCommon(MyApp, bus);
+```
+In Dart:
+```Dart
+// index.dart, running on the UI side
+import 'package:angular2/src/web_workers/ui/impl.dart' show bootstrapUICommon;
+import "package:angular2/src/core/reflection/reflection.dart";
+import "package:angular2/src/core/reflection/reflection_capabilities.dart";
+
+main() {
+ reflector.reflectionCapabilities = new ReflectionCapabilities();
+ var bus = new MyAwesomeMessageBus();
+ bootstrapUiCommon(bus);
+}
+```
+```Dart
+// background_index.dart, running on the application side
+import "package:angular2/src/web_workers/worker/application_common.dart" show bootstrapWebWorkerCommon;
+import "package:angular2/src/core/reflection/reflection.dart";
+import "package:angular2/src/core/reflection/reflection_capabilities.dart";
+import "./app.dart" show MyApp;
+
+main() {
+ reflector.reflectionCapabilities = new ReflectionCapabilities();
+ var bus = new MyAwesomeMessageBus();
+ bootstrapWebWorkerCommon(MyApp, bus);
+}
+```
+Notice how we call `bootstrapUICommon` instead of `bootstrap` from the UI side. `bootstrap` spans a new WebWorker
+/ Isolate and attaches the default angular MessageBus to it. If you're using a custom MessageBus you are
+responsible for setting up the application side and initiating communication with it. `bootstrapUICommon` assumes
+that the given MessageBus is already set up and can communicate with the application.
+Similarly, we call `bootstrapWebWorkerCommon` instead of `boostrapWebWorker` from the application side. This is
+because `bootstrapWebWorker` assumes you're using the default angular MessageBus and initializes a new one for you.
+
+## MessageBroker
+The MessageBroker is a higher level messaging abstraction that sits on top of the MessageBus. It is used when you
+want to execute code on the other side of a runtime boundary and may want to receive the result.
+There are two types of MessageBrokers. The `ServiceMessageBroker` is used by the side that actually performs
+an operation and may return a result. Conversely, the `ClientMessageBroker` is used by the side that requests that
+an operation be performed and may want to receive the result.
+
+### Using the MessageBroker In Your Application
+To use MessageBrokers in your application you must initialize both a `ClientMessageBroker` and a
+`ServiceMessageBroker` on the same channel. You can then register methods with the `ServiceMessageBroker` and
+instruct the `ClientMessageBroker` to run those methods. Below is a lightweight example of using
+MessageBrokers in an application. For a more complete example, check out the `WebWorkerRenderer` and
+`MessageBasedRenderer` inside the Angular WebWorker code.
+
+#### Using the MessageBroker in TypeScript
+```TypeScript
+// index.ts, which is running on the UI with a method that we want to expose to a WebWorker
+import {bootstrap} from 'angular2/web_worker/ui';
+
+var instance = bootstrap("loader.js");
+var broker = instance.app.createServiceMessageBroker("My Broker Channel");
+
+// assume we have some function doCoolThings that takes a string argument and returns a Promise
+broker.registerMethod("awesomeMethod", [PRIMITIVE], (arg1: string) => doCoolThing(arg1), PRIMITIVE);
+```
+```TypeScript
+// background.ts, which is running on a WebWorker and wants to execute a method on the UI
+import {Component, View, ClientMessageBrokerFactory, PRIMITIVE, UiArguments, FnArgs}
+from 'angular2/web_worker/worker';
+
+@Component(...)
+@View(...)
+export class MyComponent {
+ constructor(brokerFactory: ClientMessageBrokerFactory) {
+ var broker = brokerFactory.createMessageBroker("My Broker Channel");
+
+ var arguments = [new FnArg(value, PRIMITIVE)];
+ var methodInfo = new UiArguments("awesomeMethod", arguments);
+ broker.runOnService(methodInfo, PRIMTIVE).then((result: string) => {
+ // result will be equal to the return value of doCoolThing(value) that ran on the UI.
+ });
+ }
+}
+```
+#### Using the MessageBroker in Dart
+```Dart
+// index.dart, which is running on the UI with a method that we want to expose to a WebWorker
+import 'package:angular2/web_worker/ui.dart';
+
+main() {
+ var instance = bootstrap("background.dart");
+ var broker = instance.app.createServiceMessageBroker("My Broker Channel");
+
+ // assume we have some function doCoolThings that takes a String argument and returns a Future
+ broker.registerMethod("awesomeMethod", [PRIMITIVE], (String arg1) => doCoolThing(arg1), PRIMITIVE);
+}
+
+```
+```Dart
+// background.dart, which is running on a WebWorker and wants to execute a method on the UI
+import 'package:angular2/web_worker/worker.dart';
+
+@Component(...)
+@View(...)
+class MyComponent {
+ MyComponent(ClientMessageBrokerFactory brokerFactory) {
+ var broker = brokerFactory.createMessageBroker("My Broker Channel");
+
+ var arguments = [new FnArg(value, PRIMITIVE)];
+ var methodInfo = new UiArguments("awesomeMethod", arguments);
+ broker.runOnService(methodInfo, PRIMTIVE).then((String result) {
+ // result will be equal to the return value of doCoolThing(value) that ran on the UI.
+ });
+ }
+}
+```
+Both the client and the service create new MessageBrokers and attach them to the same channel.
+The service then calls `registerMethod` to register the method that it wants to listen to. Register method takes
+four arguments. The first is the name of the method, the second is the Types of that method's parameters, the
+third is the method itself, and the fourth (which is optional) is the return Type of that method.
+The MessageBroker handles serializing / deserializing your parameters and return types using angular's serializer.
+However, at the moment the serializer only knows how to serialize angular classes like those used by the Renderer.
+If you're passing anything other than those types around in your application you can handle serialization yourself
+and then use the `PRIMITIVE` type to tell the MessageBroker to avoid serializing your data.
+
+The last thing that happens is that the client calls `runOnService` with the name of the method it wants to run,
+a list of that method's arguments and their types, and (optionally) the expected return type.
diff --git a/modules/angular2/src/di/type_info.ts b/modules/angular2/examples/animate/ts/.gitkeep
similarity index 100%
rename from modules/angular2/src/di/type_info.ts
rename to modules/angular2/examples/animate/ts/.gitkeep
diff --git a/modules/angular2/examples/core/ts/.gitkeep b/modules/angular2/examples/core/ts/.gitkeep
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/modules/angular2/examples/http/ts/.gitkeep b/modules/angular2/examples/http/ts/.gitkeep
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/modules/angular2/examples/router/ts/.gitkeep b/modules/angular2/examples/router/ts/.gitkeep
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/modules/angular2/examples/web_workers/ts/.gitkeep b/modules/angular2/examples/web_workers/ts/.gitkeep
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/modules/angular2/forms.ts b/modules/angular2/forms.ts
deleted file mode 100644
index 723f9ff1a36c6..0000000000000
--- a/modules/angular2/forms.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * @module
- * @description
- * This module is used for handling user input, by defining and building a {@link ControlGroup} that
- * consists of
- * {@link Control} objects, and mapping them onto the DOM. {@link Control} objects can then be used
- * to read information
- * from the form DOM elements.
- *
- * This module is not included in the `angular2` module; you must import the forms module
- * explicitly.
- *
- */
-
-export {AbstractControl, Control, ControlGroup, ControlArray} from './src/forms/model';
-
-export {AbstractControlDirective} from './src/forms/directives/abstract_control_directive';
-export {Form} from './src/forms/directives/form_interface';
-export {ControlContainer} from './src/forms/directives/control_container';
-export {NgControlName} from './src/forms/directives/ng_control_name';
-export {NgFormControl} from './src/forms/directives/ng_form_control';
-export {NgModel} from './src/forms/directives/ng_model';
-export {NgControl} from './src/forms/directives/ng_control';
-export {NgControlGroup} from './src/forms/directives/ng_control_group';
-export {NgFormModel} from './src/forms/directives/ng_form_model';
-export {NgForm} from './src/forms/directives/ng_form';
-export {ControlValueAccessor} from './src/forms/directives/control_value_accessor';
-export {DefaultValueAccessor} from './src/forms/directives/default_value_accessor';
-export {CheckboxControlValueAccessor} from './src/forms/directives/checkbox_value_accessor';
-export {
- NgSelectOption,
- SelectControlValueAccessor
-} from './src/forms/directives/select_control_value_accessor';
-export {FORM_DIRECTIVES} from './src/forms/directives';
-export {Validators} from './src/forms/validators';
-export {NgValidator, NgRequiredValidator} from './src/forms/directives/validators';
-export {FormBuilder} from './src/forms/form_builder';
-
-import {FormBuilder} from './src/forms/form_builder';
-import {CONST_EXPR, Type} from './src/facade/lang';
-
-export const FORM_BINDINGS: List = CONST_EXPR([FormBuilder]);
diff --git a/modules/angular2/globals.d.ts b/modules/angular2/globals.d.ts
deleted file mode 100644
index 4e45e219f906c..0000000000000
--- a/modules/angular2/globals.d.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * This file contains declarations of global symbols we reference in our code
- */
-
-///
-declare var assert: any;
-declare type int = number;
-
-interface List extends Array {}
-
-// FIXME: K must be string!
-// FIXME: should have an index signature, `[k: string]: V;`
-interface StringMap {}
-
-interface BrowserNodeGlobal {
- Object: typeof Object;
- Array: typeof Array;
- Map: typeof Map;
- Set: typeof Set;
- Date: typeof Date;
- RegExp: typeof RegExp;
- JSON: typeof JSON;
- Math: typeof Math;
- assert(condition): void;
- Reflect: any;
- zone: Zone;
- getAngularTestability: Function;
- getAllAngularTestabilities: Function;
- setTimeout: Function;
- clearTimeout: Function;
- setInterval: Function;
- clearInterval: Function;
-}
diff --git a/modules/angular2/http.ts b/modules/angular2/http.ts
new file mode 100644
index 0000000000000..20058d784a2f5
--- /dev/null
+++ b/modules/angular2/http.ts
@@ -0,0 +1,290 @@
+/**
+ * @module
+ * @description
+ * The http module provides services to perform http requests. To get started, see the {@link Http}
+ * class.
+ */
+import {provide, Provider} from 'angular2/angular2';
+import {Http, Jsonp} from './src/http/http';
+import {XHRBackend, XHRConnection} from './src/http/backends/xhr_backend';
+import {JSONPBackend, JSONPBackend_, JSONPConnection} from './src/http/backends/jsonp_backend';
+import {BrowserXhr} from './src/http/backends/browser_xhr';
+import {BrowserJsonp} from './src/http/backends/browser_jsonp';
+import {BaseRequestOptions, RequestOptions} from './src/http/base_request_options';
+import {ConnectionBackend} from './src/http/interfaces';
+import {BaseResponseOptions, ResponseOptions} from './src/http/base_response_options';
+
+export {MockConnection, MockBackend} from './src/http/backends/mock_backend';
+export {Request} from './src/http/static_request';
+export {Response} from './src/http/static_response';
+
+export {
+ RequestOptionsArgs,
+ ResponseOptionsArgs,
+ Connection,
+ ConnectionBackend
+} from './src/http/interfaces';
+
+export {BrowserXhr} from './src/http/backends/browser_xhr';
+export {BaseRequestOptions, RequestOptions} from './src/http/base_request_options';
+export {BaseResponseOptions, ResponseOptions} from './src/http/base_response_options';
+export {XHRBackend, XHRConnection} from './src/http/backends/xhr_backend';
+export {JSONPBackend, JSONPConnection} from './src/http/backends/jsonp_backend';
+export {Http, Jsonp} from './src/http/http';
+
+export {Headers} from './src/http/headers';
+
+export {ResponseTypes, ReadyStates, RequestMethods} from './src/http/enums';
+export {URLSearchParams} from './src/http/url_search_params';
+
+/**
+ * Provides a basic set of injectables to use the {@link Http} service in any application.
+ *
+ * The `HTTP_PROVIDERS` should be included either in a component's injector,
+ * or in the root injector when bootstrapping an application.
+ *
+ * ### Example ([live demo](http://plnkr.co/edit/snj7Nv?p=preview))
+ *
+ * ```
+ * import {bootstrap, Component, NgFor, View} from 'angular2/angular2';
+ * import {HTTP_PROVIDERS, Http} from 'angular2/http';
+ *
+ * @Component({
+ * selector: 'app',
+ * providers: [HTTP_PROVIDERS],
+ * template: `
+ *
+ *
People
+ *
+ *
+ * {{person.name}}
+ *
+ *
+ *
+ * `,
+ * directives: [NgFor]
+ * })
+ * export class App {
+ * people: Object[];
+ * constructor(http:Http) {
+ * http.get('people.json').subscribe(res => {
+ * this.people = res.json();
+ * });
+ * }
+ * active:boolean = false;
+ * toggleActiveState() {
+ * this.active = !this.active;
+ * }
+ * }
+ *
+ * bootstrap(App)
+ * .catch(err => console.error(err));
+ * ```
+ *
+ * The primary public API included in `HTTP_PROVIDERS` is the {@link Http} class.
+ * However, other providers required by `Http` are included,
+ * which may be beneficial to override in certain cases.
+ *
+ * The providers included in `HTTP_PROVIDERS` include:
+ * * {@link Http}
+ * * {@link XHRBackend}
+ * * `BrowserXHR` - Private factory to create `XMLHttpRequest` instances
+ * * {@link RequestOptions} - Bound to {@link BaseRequestOptions} class
+ * * {@link ResponseOptions} - Bound to {@link BaseResponseOptions} class
+ *
+ * There may be cases where it makes sense to extend the base request options,
+ * such as to add a search string to be appended to all URLs.
+ * To accomplish this, a new provider for {@link RequestOptions} should
+ * be added in the same injector as `HTTP_PROVIDERS`.
+ *
+ * ### Example ([live demo](http://plnkr.co/edit/aCMEXi?p=preview))
+ *
+ * ```
+ * import {provide, bootstrap} from 'angular2/angular2';
+ * import {HTTP_PROVIDERS, BaseRequestOptions, RequestOptions} from 'angular2/http';
+ *
+ * class MyOptions extends BaseRequestOptions {
+ * search: string = 'coreTeam=true';
+ * }
+ *
+ * bootstrap(App, [HTTP_PROVIDERS, provide(RequestOptions, {useClass: MyOptions})])
+ * .catch(err => console.error(err));
+ * ```
+ *
+ * Likewise, to use a mock backend for unit tests, the {@link XHRBackend}
+ * provider should be bound to {@link MockBackend}.
+ *
+ * ### Example ([live demo](http://plnkr.co/edit/7LWALD?p=preview))
+ *
+ * ```
+ * import {provide, Injector} from 'angular2/angular2';
+ * import {HTTP_PROVIDERS, Http, Response, XHRBackend, MockBackend} from 'angular2/http';
+ *
+ * var people = [{name: 'Jeff'}, {name: 'Tobias'}];
+ *
+ * var injector = Injector.resolveAndCreate([
+ * HTTP_PROVIDERS,
+ * MockBackend,
+ * provide(XHRBackend, {useExisting: MockBackend})
+ * ]);
+ * var http = injector.get(Http);
+ * var backend = injector.get(MockBackend);
+ *
+ * // Listen for any new requests
+ * backend.connections.observer({
+ * next: connection => {
+ * var response = new Response({body: people});
+ * setTimeout(() => {
+ * // Send a response to the request
+ * connection.mockRespond(response);
+ * });
+ * });
+ *
+ * http.get('people.json').observer({
+ * next: res => {
+ * // Response came from mock backend
+ * console.log('first person', res.json()[0].name);
+ * }
+ * });
+ * ```
+ */
+export const HTTP_PROVIDERS: any[] = [
+ // TODO(pascal): use factory type annotations once supported in DI
+ // issue: https://github.com/angular/angular/issues/3183
+ provide(Http,
+ {
+ useFactory: (xhrBackend, requestOptions) => new Http(xhrBackend, requestOptions),
+ deps: [XHRBackend, RequestOptions]
+ }),
+ BrowserXhr,
+ provide(RequestOptions, {useClass: BaseRequestOptions}),
+ provide(ResponseOptions, {useClass: BaseResponseOptions}),
+ XHRBackend
+];
+
+/**
+ * @deprecated
+ */
+export const HTTP_BINDINGS = HTTP_PROVIDERS;
+
+/**
+ * Provides a basic set of providers to use the {@link Jsonp} service in any application.
+ *
+ * The `JSONP_PROVIDERS` should be included either in a component's injector,
+ * or in the root injector when bootstrapping an application.
+ *
+ * ### Example ([live demo](http://plnkr.co/edit/vmeN4F?p=preview))
+ *
+ * ```
+ * import {Component, NgFor, View} from 'angular2/angular2';
+ * import {JSONP_PROVIDERS, Jsonp} from 'angular2/http';
+ *
+ * @Component({
+ * selector: 'app',
+ * providers: [JSONP_PROVIDERS],
+ * template: `
+ *