angular-cn/modules/@angular
George Kalpakas 07122f0ad9 fix(upgrade): populate upgraded component's view before creating the controller (#14289)
Previously, the relative order of the AngularJS compiling/linking operations was
not similar to AngularJS's, resulting in inconsistent behavior for upgraded
components (which made upgrading to Angular less straight forward).

This commit fixes it, by following the compiling/linking process of AngularJS
more closely.

Main differences:

- The components view is already populated when the controller is instantiated
  (and subsequent hooks are called).
- The correct DOM content is available when running the `$onChanges`, `$onInit`,
  `$doCheck` hooks. Previously, the "content children" were still present, not
  the "view children".
- The same for pre-linking.
- The template is compiled in the correct DOM context (e.g. has access to
  ancestors). Previously, it was compiled in isolation, inside a dummy element.

For reference, here is the order of operations:

**Before**

1. Compile template
2. Instantiate controller
3. Hook: $onChanges
4. Hook: $onInit
5. Hook: $doCheck
6. Pre-linking
7. Collect content children
8. Insert compiled template
9. Linking
10. Post-linking
11. Hook: $postLink

**After**

1. Collect content children
2. Insert template
3. Compile template
4. Instantiate controller
5. Hook: $onChanges
6. Hook: $onInit
7. Hook: $doCheck
8. Pre-linking
9. Linking
10. Post-linking
11. Hook: $postLink

Fixes #13912
2017-03-07 09:32:52 -08:00
..
animations fix(animations): make animations work in AOT (#14775) 2017-03-01 17:13:06 -08:00
benchpress refactor: remove lang.ts (#14837) 2017-03-06 15:22:29 -08:00
common refactor: remove lang.ts (#14837) 2017-03-06 15:22:29 -08:00
compiler fix(compiler): don’t throw for empty array literal in assignments (#14878) 2017-03-06 17:01:45 -08:00
compiler-cli fix: throw for synthetic properties / listeners by default (#14880) 2017-03-06 17:15:08 -08:00
core fix: throw for synthetic properties / listeners by default (#14880) 2017-03-06 17:15:08 -08:00
docs perf: distrubute smaller bundled code and include es2015 bundle 2017-02-21 20:48:55 -08:00
examples fix: throw for synthetic properties / listeners by default (#14880) 2017-03-06 17:15:08 -08:00
forms refactor: remove lang.ts (#14837) 2017-03-06 15:22:29 -08:00
http build: resolve review comments on flat modules PR and fix more bugs (#14660) 2017-02-23 16:39:44 -08:00
language-service fix(language-service): tolerate errors in decorators (#14634) 2017-03-01 13:23:34 -08:00
platform-browser fix: throw for synthetic properties / listeners by default (#14880) 2017-03-06 17:15:08 -08:00
platform-browser-dynamic refactor: remove lang.ts (#14837) 2017-03-06 15:22:29 -08:00
platform-server fix: throw for synthetic properties / listeners by default (#14880) 2017-03-06 17:15:08 -08:00
platform-webworker refactor: remove lang.ts (#14837) 2017-03-06 15:22:29 -08:00
platform-webworker-dynamic refactor: remove lang.ts (#14837) 2017-03-06 15:22:29 -08:00
router refactor: remove lang.ts (#14837) 2017-03-06 15:22:29 -08:00
upgrade fix(upgrade): populate upgraded component's view before creating the controller (#14289) 2017-03-07 09:32:52 -08:00
README.md docs: update README.md for npm packages 2016-09-14 17:14:02 -07:00
license-banner.txt style(docs): update copyright years (#13736) 2017-01-27 20:47:14 -08:00
router-license-banner.txt style(docs): update copyright years (#13736) 2017-01-27 20:47:14 -08:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

License: MIT