diff --git a/.gitattributes b/.gitattributes index b7ca95b5b77a..0acf0cd70da0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,9 @@ # Auto detect text files and perform LF normalization * text=auto -# JS files must always use LF for tools to work +# JS and TS files must always use LF for tools to work *.js eol=lf +*.ts eol=lf + +# Must keep Windows line ending to be parsed correctly +scripts/windows/packages.txt eol=crlf diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000000..c7b68e623491 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,39 @@ + + +**I'm submitting a ...** (check one with "x") +``` +[ ] bug report => search github for a similar issue or PR before submitting +[ ] feature request +[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question +``` + +**Current behavior** + + +**Expected behavior** + + +**Minimal reproduction of the problem with instructions** + + +**What is the motivation / use case for changing the behavior?** + + +**Please tell us about your environment:** + + +* **Angular version:** 2.0.X + + +* **Browser:** [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] + + +* **Language:** [all | TypeScript X.X | ES6/7 | ES5] + +* **Node (for AoT issues):** `node --version` = diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000000..70ac9a510fa0 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,36 @@ +**Please check if the PR fulfills these requirements** +- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit +- [ ] Tests for the changes have been added (for bug fixes / features) +- [ ] Docs have been added / updated (for bug fixes / features) + + +**What kind of change does this PR introduce?** (check one with "x") +``` +[ ] Bugfix +[ ] Feature +[ ] Code style update (formatting, local variables) +[ ] Refactoring (no functional changes, no api changes) +[ ] Build related changes +[ ] CI related changes +[ ] Other... Please describe: +``` + +**What is the current behavior?** (You can also link to an open issue here) + + + +**What is the new behavior?** + + + +**Does this PR introduce a breaking change?** (check one with "x") +``` +[ ] Yes +[ ] No +``` + +If this PR contains a breaking change, please describe the impact and migration path for existing applications: ... + + +**Other information**: + diff --git a/.gitignore b/.gitignore index f6961d018196..6899818c96ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,30 +1,9 @@ .DS_STORE -# Don’t commit the following directories created by pub. -packages -pubspec.lock -.pub -.packages - /dist/ -.buildlog node_modules bower_components -# Or broccoli working directory -tmp - -# Or the files created by dart2js. -*.dart.js -*.dart.precompiled.js -*.js_ -*.js.deps -*.js.map - -# Or type definitions we mirror from github -**/typings/**/*.d.ts -**/typings/tsd.cached.json - # Include when developing application packages. pubspec.lock .c9 @@ -38,13 +17,12 @@ modules/.vscode # Don't check in secret files *secret.js -# Ignore npm debug log +# Ignore npm/yarn debug log npm-debug.log - -/docs/bower_components/ +yarn-error.log # build-analytics .build-analytics -# built dart payload tests -/modules_dart/payload/**/build +# rollup-test output +/modules/rollup-test/dist/ diff --git a/.nvmrc b/.nvmrc index fae6e3d04b2c..e1e5d1369adb 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -4.2.1 +6.9.5 diff --git a/.pullapprove.yml b/.pullapprove.yml new file mode 100644 index 000000000000..fd0a705f7c03 --- /dev/null +++ b/.pullapprove.yml @@ -0,0 +1,256 @@ +# Configuration for pullapprove.com +# +# Approval access and primary role is determined by info in the project ownership spreadsheet: +# https://docs.google.com/spreadsheets/d/1-HIlzfbPYGsPr9KuYMe6bLfc4LXzPjpoALqtYRYTZB0/edit?pli=1#gid=0&vpid=A5 +# +# === GitHub username to Full name map === +# +# alexeagle - Alex Eagle +# alxhub - Alex Rickabaugh +# chuckjaz - Chuck Jazdzewski +# gkalpak - George Kalpakas +# IgorMinar - Igor Minar +# jasonaden - Jason Aden +# kara - Kara Erickson +# matsko - Matias Niemelä +# mhevery - Misko Hevery +# petebacondarwin - Pete Bacon Darwin +# pkozlowski-opensource - Pawel Kozlowski +# robwormald - Rob Wormald +# tbosch - Tobias Bosch +# vicb - Victor Berchet +# vikerman - Vikram Subramanian +# wardbell - Ward Bell +# tinayuangao - Tina Gao + +version: 2 + +group_defaults: + required: 1 + reset_on_reopened: + enabled: true + approve_by_comment: + enabled: false + +groups: + root: + conditions: + files: + include: + - "*" + exclude: + - "aio/*" + - "integration/*" + - "modules/*" + - "packages/*" + - "tools/*" + users: + - IgorMinar + - mhevery + + public-api: + conditions: + files: + include: + - "tools/public_api_guard/*" + users: + - IgorMinar + - mhevery + + build-and-ci: + conditions: + files: + include: + - "*.yml" + - "*.json" + - "*.lock" + - "tools/*" + exclude: + - "tools/@angular/tsc-wrapped/*" + - "tools/public_api_guard/*" + - "aio/*" + users: + - IgorMinar #primary + - alexeagle + - jasonaden + - mhevery #fallback + + integration: + conditions: + files: + - "integration/*" + users: + - alexeagle + - mhevery + - tbosch + - vicb + - IgorMinar #fallback + + + core: + conditions: + files: + - "packages/core/*" + users: + - tbosch #primary + - mhevery + - vicb + - IgorMinar #fallback + + compiler/animations: + conditions: + files: + - "packages/compiler/src/animation/*" + users: + - matsko #primary + - tbosch + - IgorMinar #fallback + - mhevery #fallback + + compiler/i18n: + conditions: + files: + - "packages/compiler/src/i18n/*" + users: + - vicb #primary + - tbosch + - IgorMinar #fallback + - mhevery #fallback + + compiler: + conditions: + files: + - "packages/compiler/*" + users: + - tbosch #primary + - vicb + - chuckjaz + - mhevery + - IgorMinar #fallback + + compiler-cli: + conditions: + files: + - "tools/@angular/tsc-wrapped/*" + - "packages/compiler-cli/*" + users: + - alexeagle + - chuckjaz + - tbosch + - IgorMinar #fallback + - mhevery #fallback + + common: + conditions: + files: + - "packages/common/*" + users: + - pkozlowski-opensource #primary + - vicb + - IgorMinar #fallback + - mhevery #fallback + + forms: + conditions: + files: + - "packages/forms/*" + users: + - kara #primary + - tinayuangao #secondary + - IgorMinar #fallback + - mhevery #fallback + + http: + conditions: + files: + - "packages/http/*" + users: + - vikerman #primary + - alxhub + - IgorMinar #fallback + - mhevery #fallback + + language-service: + conditions: + files: + - "packages/language-service/*" + users: + - chuckjaz #primary + # needs secondary + - IgorMinar #fallback + - mhevery #fallback + + router: + conditions: + files: + - "packages/router/*" + users: + - vicb #primary + # needs secondary + - IgorMinar #fallback + - mhevery #fallback + + upgrade: + conditions: + files: + - "packages/upgrade/*" + users: + - petebacondarwin #primary + - gkalpak + - IgorMinar #fallback + - mhevery #fallback + + platform-browser: + conditions: + files: + - "packages/platform-browser/*" + users: + - tbosch #primary + - vicb #secondary + - IgorMinar #fallback + - mhevery #fallback + + platform-server: + conditions: + files: + - "packages/platform-server/*" + users: + - vikerman #primary + - alxhub + - vicb + - tbosch + - IgorMinar #fallback + - mhevery #fallback + + platform-webworker: + conditions: + files: + - "packages/platform-webworker/*" + users: + - vicb #primary + - tbosch #secondary + - IgorMinar #fallback + - mhevery #fallback + + + + benchpress: + conditions: + files: + - "packages/benchpress/*" + users: + - tbosch #primary + # needs secondary + - IgorMinar #fallback + - mhevery #fallback + + angular.io: + conditions: + files: + - "aio/*" + users: + - IgorMinar #primary + - petebacondarwin #secondary + - gkalpak + - wardbell + - mhevery #fallback diff --git a/.travis.yml b/.travis.yml index 114adc9aaa0d..0e091ce1f64d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,113 +1,73 @@ language: node_js sudo: false node_js: -- '4.2.1' + - '6.9.5' +addons: +# firefox: "38.0" + apt: + sources: + # needed to install g++ that is used by npms's native modules + - ubuntu-toolchain-r-test + packages: + # needed to install g++ that is used by npms's native modules + - g++-4.8 + # https://docs.travis-ci.com/user/jwt + jwt: + # SAUCE_ACCESS_KEY<=secret for NGBUILDS_IO_KEY to work around travis-ci/travis-ci#7223, unencrypted value in valentine as NGBUILDS_IO_KEY> + # we alias NGBUILDS_IO_KEY to $SAUCE_ACCESS_KEY in env.sh and set the SAUCE_ACCESS_KEY there + - secure: "L7nrZwkAtFtYrP2DykPXgZvEKjkv0J/TwQ/r2QGxFTaBq4VZn+2Dw0YS7uCxoMqYzDwH0aAOqxoutibVpk8Z/16nE3tNmU5RzltMd6Xmt3qU2f/JDQLMo6PSlBodnjOUsDHJgmtrcbjhqrx/znA237BkNUu6UZRT7mxhXIZpn0U=" branches: except: - g3_v2_0 cache: + yarn: true directories: - - node_modules - - $HOME/.pub-cache + - ./node_modules + - ./.chrome/chromium + - ./aio/node_modules env: global: - - KARMA_BROWSERS=DartiumWithWebPlatform - - E2E_BROWSERS=Dartium - - LOGS_DIR=/tmp/angular-build/logs - - SAUCE_USERNAME=angular-ci - - SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987 - - BROWSER_STACK_USERNAME=angularteam1 - - BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB - - 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 - # because those are not visible for pull requests, and those should also be reliable. - # This SSO token belongs to github account angular-github-ratelimit-token which has no access - # (password is in Valentine) - - TSDRC='{"token":"ef474500309daea53d5991b3079159a29520a40b"}' - # GITHUB_TOKEN_ANGULAR - - secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo=" + # GITHUB_TOKEN_ANGULAR= + # This is needed for the e2e Travis matrix task to publish packages to github for continuous packages delivery. + - secure: "rNqXoy2gqjbF5tBXlRBy+oiYntO3BtzcxZuEtlLMzNaTNzC4dyMOFub0GkzIPWwOzkARoEU9Kv+bC97fDVbCBUKeyzzEqxqddUKhzRxeaYjsefJ6XeTvBvDxwo7wDwyxZSuWdBeGAe4eARVHm7ypsd+AlvqxtzjyS27TK2BzdL4=" + # FIREBASE_TOKEN + # This is needed for publishing builds to the "aio-staging" firebase site. + # TODO(i): the token was generated using the iminar@google account, we should switch to a shared/role-base account. + - secure: "MPx3UM77o5IlhT75PKHL0FXoB5tSXDc3vnCXCd1sRy4XUTZ9vjcV6nNuyqEf+SOw659bGbC1FI4mACGx1Q+z7MQDR85b1mcA9uSgHDkh+IR82CnCVdaX9d1RXafdJIArahxfmorbiiPPLyPIKggo7ituRm+2c+iraoCkE/pXxYg=" matrix: # Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete. - - MODE=dart DART_CHANNEL=stable DART_VERSION=$DART_STABLE_VERSION - - MODE=dart DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION - - MODE=saucelabs_required DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION - - MODE=browserstack_required DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION - - MODE=saucelabs_optional DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION - - MODE=browserstack_optional 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=build_only DART_CHANNEL=stable DART_VERSION=$DART_STABLE_VERSION - - MODE=lint DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION - - MODE=payload DART_CHANNEL=stable DART_VERSION=$DART_STABLE_VERSION + - CI_MODE=e2e + - CI_MODE=e2e_2 + - CI_MODE=js + - CI_MODE=saucelabs_required + - CI_MODE=browserstack_required + - CI_MODE=saucelabs_optional + - CI_MODE=browserstack_optional + - CI_MODE=docs_test + - CI_MODE=aio matrix: + fast_finish: true allow_failures: - - env: "MODE=saucelabs_optional DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION" - - env: "MODE=browserstack_optional DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION" - - env: "MODE=dart_experimental DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION" - # TODO(alxhub): remove when dartdoc #1039 is in dev channel - - env: "MODE=dart DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION" - -addons: - firefox: "38.0" + - env: "CI_MODE=saucelabs_optional" + - env: "CI_MODE=browserstack_optional" before_install: -- node tools/analytics/build-analytics start ci job -- node tools/analytics/build-analytics start ci before_install -- echo ${TSDRC} > .tsdrc -- export DISPLAY=:99.0 -- export GIT_SHA=$(git rev-parse HEAD) -- ./scripts/ci/init_android.sh -- ./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' -- node tools/analytics/build-analytics success ci before_install + # source the env.sh script so that the exported variables are available to other scripts later on + - source ./scripts/ci/env.sh print install: - - node tools/analytics/build-analytics start ci install - # Check the size of caches - - du -sh ./node_modules || true - # Install npm dependecies - - npm install - - node tools/analytics/build-analytics success ci install - -before_script: -- node tools/analytics/build-analytics start ci before_script -- mkdir -p $LOGS_DIR -- ./scripts/ci/presubmit-queue-setup.sh -- node tools/analytics/build-analytics success ci before_script + - ./scripts/ci/install.sh script: -- node tools/analytics/build-analytics start ci script -- ./scripts/ci/build_and_test.sh ${MODE} -- node tools/analytics/build-analytics success ci script - -after_script: -- node tools/analytics/build-analytics start ci after_script -- ./scripts/ci/print-logs.sh -- ./scripts/ci/after-script.sh -- ./scripts/publish/publish-build-artifacts.sh -- node tools/analytics/build-analytics success ci after_script -- if [[ $TRAVIS_TEST_RESULT -eq 0 ]]; then node tools/analytics/build-analytics success ci job; else node tools/analytics/build-analytics error ci job; fi - -notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/1ef62e23078036f9cee4 - # trigger Buildtime Trend Service to parse Travis CI log - - https://buildtimetrend.herokuapp.com/travis - on_success: always # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: false # default: false - slack: - secure: EP4MzZ8JMyNQJ4S3cd5LEPWSMjC7ZRdzt3veelDiOeorJ6GwZfCDHncR+4BahDzQAuqyE/yNpZqaLbwRWloDi15qIUsm09vgl/1IyNky1Sqc6lEknhzIXpWSalo4/T9ZP8w870EoDvM/UO+LCV99R3wS8Nm9o99eLoWVb2HIUu0= - + - ./scripts/ci/build.sh + - ./scripts/ci/test.sh + # deploy is part of 'script' and not 'after_success' so that we fail the build if the deployment fails + - ./scripts/ci/deploy.sh + - ./scripts/ci/angular.sh + # all the scripts under this line will not quickly abort in case ${TRAVIS_TEST_RESULT} is 1 (job failure) + - ./scripts/ci/cleanup.sh + - ./scripts/ci/print-logs.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index ed8dee49345a..27e9c123d9eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3430 @@ + +# [4.0.0-rc.5](https://github.com/angular/angular/compare/4.0.0-rc.4...4.0.0-rc.5) (2017-03-17) + + +### Bug Fixes + +* **compiler-cli:** update the tsc-wrapped dependency version ([#15226](https://github.com/angular/angular/issues/15226)) ([7fb4528](https://github.com/angular/angular/commit/7fb4528)) + + + + +# [4.0.0-rc.4](https://github.com/angular/angular/compare/4.0.0-rc.3...4.0.0-rc.4) (2017-03-17) + + +### Bug Fixes + +* **animations:** always fire callbacks even for noop animations ([#15170](https://github.com/angular/angular/issues/15170)) ([3f38c6f](https://github.com/angular/angular/commit/3f38c6f)) +* **animations:** make sure easing values are applied to an empty animate() step ([#15174](https://github.com/angular/angular/issues/15174)) ([62d5543](https://github.com/angular/angular/commit/62d5543)), closes [#15115](https://github.com/angular/angular/issues/15115) +* **animations:** support multiple state names per state() call ([#15147](https://github.com/angular/angular/issues/15147)) ([36ce0af](https://github.com/angular/angular/commit/36ce0af)), closes [#14732](https://github.com/angular/angular/issues/14732) +* **compiler:** always use `ng://` prefix for sourcemap urls ([#15218](https://github.com/angular/angular/issues/15218)) ([994089d](https://github.com/angular/angular/commit/994089d)) +* **compiler:** fix utf8encode, move to sharted utils, add tests ([#15076](https://github.com/angular/angular/issues/15076)) ([959a03a](https://github.com/angular/angular/commit/959a03a)) +* **compiler:** generated code should pass `noUnusedLocals` check ([50ab06e](https://github.com/angular/angular/commit/50ab06e)), closes [#14797](https://github.com/angular/angular/issues/14797) +* **compiler:** Improve error message for missing annotations ([#14724](https://github.com/angular/angular/issues/14724)) ([3c15916](https://github.com/angular/angular/commit/3c15916)) +* **compiler:** improve error msg for unexpected closing tags ([#14747](https://github.com/angular/angular/issues/14747)) ([5f9fb91](https://github.com/angular/angular/commit/5f9fb91)), closes [#6652](https://github.com/angular/angular/issues/6652) +* **compiler:** make sourcemaps work in AOT mode ([492153a](https://github.com/angular/angular/commit/492153a)) +* **compiler:** only warn for `[@Injectable](https://github.com/Injectable)` classes with invalid args. ([5c34066](https://github.com/angular/angular/commit/5c34066)), closes [#15003](https://github.com/angular/angular/issues/15003) +* **compiler:** shouldn't throw when Symbol is used as DI token ([#13701](https://github.com/angular/angular/issues/13701)) ([8b5c6b2](https://github.com/angular/angular/commit/8b5c6b2)), closes [#13314](https://github.com/angular/angular/issues/13314) +* **compiler:** support interface types in injectable constuctors ([#14894](https://github.com/angular/angular/issues/14894)) ([b00fe20](https://github.com/angular/angular/commit/b00fe20)), closes [#12631](https://github.com/angular/angular/issues/12631) +* **compiler:** warning prints "WARNING" instead of "ERROR" ([#15125](https://github.com/angular/angular/issues/15125)) ([3b1956b](https://github.com/angular/angular/commit/3b1956b)) +* **core:** don’t recreate `TemplateRef` when used as a reference. ([#15066](https://github.com/angular/angular/issues/15066)) ([df914ef](https://github.com/angular/angular/commit/df914ef)), closes [#14873](https://github.com/angular/angular/issues/14873) +* **core:** don’t throw if queries change during change detection. ([06fc42b](https://github.com/angular/angular/commit/06fc42b)), closes [#14925](https://github.com/angular/angular/issues/14925) +* **core:** ErrorHandler should not rethrow an error by default ([#15077](https://github.com/angular/angular/issues/15077)) ([#15208](https://github.com/angular/angular/issues/15208)) ([77fd91d](https://github.com/angular/angular/commit/77fd91d)), closes [#14949](https://github.com/angular/angular/issues/14949) [#15182](https://github.com/angular/angular/issues/15182) [#14316](https://github.com/angular/angular/issues/14316) +* **core:** update peer dep on zone.js to ^0.8.4 ([#15209](https://github.com/angular/angular/issues/15209)) ([d2fbbb4](https://github.com/angular/angular/commit/d2fbbb4)), closes [#15180](https://github.com/angular/angular/issues/15180) [#15185](https://github.com/angular/angular/issues/15185) +* **core:** use presence of .subscribe to detect observables rather then Symbol.observable ([#15171](https://github.com/angular/angular/issues/15171)) ([6e98757](https://github.com/angular/angular/commit/6e98757)), closes [#14298](https://github.com/angular/angular/issues/14298) [#14473](https://github.com/angular/angular/issues/14473) [#14926](https://github.com/angular/angular/issues/14926) +* **forms:** ensure observable validators are properly canceled ([#15132](https://github.com/angular/angular/issues/15132)) ([26d4ce2](https://github.com/angular/angular/commit/26d4ce2)) +* **forms:** remove equalsTo validator ([#15050](https://github.com/angular/angular/issues/15050)) ([778f7d6](https://github.com/angular/angular/commit/778f7d6)) +* element injector vs module injector ([#15044](https://github.com/angular/angular/issues/15044)) ([13686bb](https://github.com/angular/angular/commit/13686bb)), closes [#12869](https://github.com/angular/angular/issues/12869) [#12889](https://github.com/angular/angular/issues/12889) [#13885](https://github.com/angular/angular/issues/13885) [#13870](https://github.com/angular/angular/issues/13870) +* **http:** Make ResponseOptionsArgs an interface ([#14607](https://github.com/angular/angular/issues/14607)) ([#14623](https://github.com/angular/angular/issues/14623)) ([f1b33ab](https://github.com/angular/angular/commit/f1b33ab)), closes [#13708](https://github.com/angular/angular/issues/13708) +* **platform-browser:** prevent clobbered elements from freezing the browser ([a4076c7](https://github.com/angular/angular/commit/a4076c7)) +* **platform-server:** correctly implement get href in parse5 adapter ([#15022](https://github.com/angular/angular/issues/15022)) ([80649ea](https://github.com/angular/angular/commit/80649ea)) +* **platform-server:** fix an exception when HostListener('window:scroll') is used on the server ([#15019](https://github.com/angular/angular/issues/15019)) ([4f7d62a](https://github.com/angular/angular/commit/4f7d62a)) +* correct UMD resolutions for platform-browser_animations ([#15190](https://github.com/angular/angular/issues/15190)) ([923d0c5](https://github.com/angular/angular/commit/923d0c5)), closes [#15114](https://github.com/angular/angular/issues/15114) +* don't instantiate providers with ngOnDestroy eagerly. ([#15070](https://github.com/angular/angular/issues/15070)) ([2c5a671](https://github.com/angular/angular/commit/2c5a671)), closes [#14552](https://github.com/angular/angular/issues/14552) +* fix path locally to empty.js ([#15073](https://github.com/angular/angular/issues/15073)) ([80112a9](https://github.com/angular/angular/commit/80112a9)) +* **platform-server:** fix get/set title in parse5 adapter ([#14965](https://github.com/angular/angular/issues/14965)) ([018e5c9](https://github.com/angular/angular/commit/018e5c9)) +* **platform-server:** handle styles with extra ':'s correctly ([#15189](https://github.com/angular/angular/issues/15189)) ([013d806](https://github.com/angular/angular/commit/013d806)) +* **platform-server:** support svg elements with namespaced attributes ([#15101](https://github.com/angular/angular/issues/15101)) ([f093501](https://github.com/angular/angular/commit/f093501)) +* **router:** fix query parameters with multiple values ([#15129](https://github.com/angular/angular/issues/15129)) ([029d0f2](https://github.com/angular/angular/commit/029d0f2)), closes [#14796](https://github.com/angular/angular/issues/14796) +* **tsc-wrapped:** emit js files in all cases ([c0e05e6](https://github.com/angular/angular/commit/c0e05e6)) + + +### Code Refactoring + +* **core:** use flags in `Renderer2.setStyle` instead of booleans ([#15045](https://github.com/angular/angular/issues/15045)) ([ff71eff](https://github.com/angular/angular/commit/ff71eff)) + +### Features + +* **common:** support `as` syntax in template/* bindings ([#15025](https://github.com/angular/angular/issues/15025)) ([c10c060](https://github.com/angular/angular/commit/c10c060)), closes [#15020](https://github.com/angular/angular/issues/15020) +* **compiler-cli:** support metadata file aliases ([0ab49d4](https://github.com/angular/angular/commit/0ab49d4)) +* **core:** allow to provide multiple default testing modules ([#15054](https://github.com/angular/angular/issues/15054)) ([6c8638c](https://github.com/angular/angular/commit/6c8638c)) +* **core:** expose `inputs`, `outputs` and `ngContentSelectors` on `ComponentFactory`. ([1171f91](https://github.com/angular/angular/commit/1171f91)) +* **upgrade:** support multi-slot projection in upgrade/static ([#14282](https://github.com/angular/angular/issues/14282)) ([914797a](https://github.com/angular/angular/commit/914797a)), closes [#14261](https://github.com/angular/angular/issues/14261) +* **upgrade:** use `ComponentFactory.inputs/outputs/ngContentSelectors` ([a3e32fb](https://github.com/angular/angular/commit/a3e32fb)) +* introduce source maps for templates ([#15011](https://github.com/angular/angular/issues/15011)) ([cdc882b](https://github.com/angular/angular/commit/cdc882b)) + +### BREAKING CHANGES + +* Perviously, any provider that had an ngOnDestroy lifecycle hook would be created eagerly. + + Now, only classes that are annotated with @Component, @Directive, @Pipe, @NgModule are eager. Providers only become eager if they are either directly or transitively injected into one of the above. + + This also makes all `useValue` providers eager, which + should have no observable impact other than code size. + + **EXPECTED IMPACT**: + Making providers eager was an incorrect behavior and never documented. + Also, providers that are used by a directive / pipe / ngModule stay eager. + So the impact should be rather small. + +* DebugNode.source no longer returns the source location of a node. + + Closes 14013 + +* core: (since v4 rc.1) + - `Renderer2.setStyle` no longer takes booleans but rather a + bit mask of flags. + + + + +## [2.4.10](https://github.com/angular/angular/compare/2.4.9...2.4.10) (2017-03-17) + +### Bug Fixes + +* **compiler:** fix decoding surrogate pairs ([#15154](https://github.com/angular/angular/issues/15154)) ([e5c9bbc](https://github.com/angular/angular/commit/e5c9bbc)) +* **router:** do not finish bootstrap until all the routes are resolved ([#15121](https://github.com/angular/angular/issues/15121)) ([34403cd](https://github.com/angular/angular/commit/34403cd)) + + + +# [4.0.0-rc.3](https://github.com/angular/angular/compare/4.0.0-rc.2...4.0.0-rc.3) (2017-03-10) + + +### Bug Fixes + +* **compiler:** don’t throw for empty array literal in assignments ([#14878](https://github.com/angular/angular/issues/14878)) ([6cd3326](https://github.com/angular/angular/commit/6cd3326)), closes [#14782](https://github.com/angular/angular/issues/14782) +* **compiler:** improve error message when a module imports itself ([#14646](https://github.com/angular/angular/issues/14646)) ([6bc6482](https://github.com/angular/angular/commit/6bc6482)), closes [#14644](https://github.com/angular/angular/issues/14644) +* **core:** allow to use the `Renderer` outside of views. ([#14882](https://github.com/angular/angular/issues/14882)) ([ba4b6f5](https://github.com/angular/angular/commit/ba4b6f5)), closes [#14872](https://github.com/angular/angular/issues/14872) +* **router:** do not finish bootstrap until all the routes are resolved ([#14762](https://github.com/angular/angular/issues/14762)) ([5df998d](https://github.com/angular/angular/commit/5df998d)) +* **upgrade:** populate upgraded component's view before creating the controller ([#14289](https://github.com/angular/angular/issues/14289)) ([07122f0](https://github.com/angular/angular/commit/07122f0)), closes [#13912](https://github.com/angular/angular/issues/13912) +* throw for synthetic properties / listeners by default ([#14880](https://github.com/angular/angular/issues/14880)) ([3651d8d](https://github.com/angular/angular/commit/3651d8d)) + + +### BREAKING CHANGES + +#### since 4.0 rc.1: +- rename `RendererV2` to `Renderer2` +- rename `RendererTypeV2` to `RendererType2` +- rename `RendererFactoryV2` to `RendererFactory2` + + +## [2.4.9](https://github.com/angular/angular/compare/2.4.8...2.4.9) (2017-03-02) + + +### Bug Fixes + +* **http:** Make ResponseOptionsArgs an interface ([b658fa9](https://github.com/angular/angular/commit/b658fa9)), closes [#13708](https://github.com/angular/angular/issues/13708) +* **router:** improve robustness ([#14602](https://github.com/angular/angular/issues/14602)) ([2a12346](https://github.com/angular/angular/commit/2a12346)) + + +### Reverts + +* fix(router): do not finish bootstrap until all the routes are resolved ([#14327](https://github.com/angular/angular/issues/14327)) ([de36f8a](https://github.com/angular/angular/commit/de36f8a)), closes [#14681](https://github.com/angular/angular/issues/14681) [#14588](https://github.com/angular/angular/issues/14588) + + + + +## [4.0.0-rc.2](https://github.com/angular/angular/compare/4.0.0-rc.1...4.0.0-rc.2) (2017-03-02) + + +### Bug Fixes + +* **animations:** make animations work in AOT ([#14775](https://github.com/angular/angular/issues/14775)) ([9560ad8](https://github.com/angular/angular/commit/9560ad8)) +* **compiler:** apply element bindings before host bindings ([#14823](https://github.com/angular/angular/issues/14823)) ([79fc1e3](https://github.com/angular/angular/commit/79fc1e3)) +* **compiler:** fix identifier names of `EMPTY_MAP` / `EMPTY_ARRAY` ([#14806](https://github.com/angular/angular/issues/14806)) ([5ba55b0](https://github.com/angular/angular/commit/5ba55b0)) +* **compiler:** quote `animation` in `RendererTypeV2` and skip if empty ([#14773](https://github.com/angular/angular/issues/14773)) ([77682a3](https://github.com/angular/angular/commit/77682a3)) +* **core:** call lifecycle hooks for siblings in declaration order ([d2e4256](https://github.com/angular/angular/commit/d2e4256)) +* **core:** fix `isComponentView()` and `isEmbeddedView()` tests ([#14789](https://github.com/angular/angular/issues/14789)) ([5753de5](https://github.com/angular/angular/commit/5753de5)), closes [#14778](https://github.com/angular/angular/issues/14778) +* **language-service:** tolerate errors in decorators ([#14634](https://github.com/angular/angular/issues/14634)) ([6bae737](https://github.com/angular/angular/commit/6bae737)), closes [#14631](https://github.com/angular/angular/issues/14631) +* **platform-server:** don't setup Testability and TestabilityRegistry on the server ([#14510](https://github.com/angular/angular/issues/14510)) ([47bdc2b](https://github.com/angular/angular/commit/47bdc2b)) +* **tsc-wrapped:** validate metadata in static members of a class ([#14772](https://github.com/angular/angular/issues/14772)) ([a6996a9](https://github.com/angular/angular/commit/a6996a9)), closes [#13481](https://github.com/angular/angular/issues/13481) +* **upgrade:** fix upgrade component Closure optimization. ([#14801](https://github.com/angular/angular/issues/14801)) ([968995a](https://github.com/angular/angular/commit/968995a)) + + +### Performance Improvements + +* delete pre-view-engine core, compiler, platform-browser, etc code ([#14788](https://github.com/angular/angular/issues/14788)) ([126fda2](https://github.com/angular/angular/commit/126fda2)) +* **compiler:** make identifiers for generated code small to improve dev size ([5caab71](https://github.com/angular/angular/commit/5caab71f7dc64b10f3544b2a3b2650e1666adbf1)) + + + + +# [4.0.0-rc.1](https://github.com/angular/angular/compare/4.0.0-beta.8...4.0.0-rc.1) (2017-02-24) + +We are excited to share 4.0.0-RC.1 with the community. This is a feature-complete pre-release of 4.0.0. Upgrade to get to know the new features to be released in 4.0.0, and to help us validate the release. + +It’s important to note that this release has been tested extensively. All Angular applications within Google use the master branch of Angular, so every commit is tested and validated at scale prior to any release. + +## We Need Your Help +Please give this RC a try and test it with your projects! We have spent a significant amount of time working to ensure that this release is backwards compatible and will work with your existing code, but you may have use cases we haven’t anticipated. If you are broken by this release, let us know so that we can look into it right away. We are also looking for feedback related to the ergonomics of any newly added APIs. + +## What’s New + +### View Engine +We’ve made changes under to hood to what AOT generated code looks like. These changes should reduce the size of the generated code for your components by more than half in some cases. Read the [Design Doc](https://docs.google.com/document/d/195L4WaDSoI_kkW094LlShH6gT3B7K1GZpSBnnLkQR-g/preview) for the View Engine updates. + + +### Enhanced `*ngIf` syntax +Our template binding syntax now supports a couple helpful changes. You can now use an if/else style syntax, and assign local variables such as when unrolling an observable. + +``` +Loading... +
+ {{ user.name }} +
+``` + + +### Animation Package +We have pulled Animations into their own package. This means that if you don’t use Animations, this extra code will not end up in your production bundles. This also allows you to more easily find documentation and to take better advantage of autocompletion. If you do need animations, libraries like Material will automatically import the module (once you install it via NPM), or you can add it yourself to your main NgModule. + + +### TypeScript 2.1 +We’ve updated Angular to a more recent version of TypeScript. This will improve the speed of `ngc` and you will get better type checking throughout your application. + + +### StrictNullChecks +Angular is now compliant with [TypeScript’s StrictNullChecks](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html). This means that you can enable StrictNullChecks in your project, if desired. + + +### Universal +Universal, the project that allows developers to run Angular on a server, is now up to date with Angular again, and has been adopted by the Angular team. This release now includes the results of the work from the Universal team over the last few months. The majority of the Universal code is now in platform-server. To learn more about this change, take a look the new [`renderModuleFactory`](https://github.com/angular/angular/blob/56f232cdd70a352cb9151bc7cfe8981bc2710ea6/modules/%40angular/platform-server/src/utils.ts#L63-L72) method, or Rob Wormald’s [Demo Repository](https://github.com/robwormald/ng-universal-demo/). More documentation is forthcoming. + + + +### Flat ES Modules (Flat ESM / FESM) +We now ship flattened versions of our modules ("rolled up" version of our code in the EcmaScript Module format, see [example file](https://github.com/angular/core-builds/blob/85cbe3f8d6107af033b0f8b56456c181cbcb5eb7/%40angular/core.js)). This format should help tree-shaking, help reduce the size of your generated bundles, and speed up build, transpilation, and loading in the browser in certain scenarios. + + +### ES2015 Builds +We now also ship our packages in the ES2015 Flat ESM format. This option is experimental and opt-in (configure your webpack to resolve ["es2015" property](https://github.com/angular/core-builds/blob/dc0c8d828a8bae6591d2b9c77974271481af818c/package.json#L7) in package.json over the regular ["module" property](https://github.com/angular/core-builds/blob/dc0c8d828a8bae6591d2b9c77974271481af818c/package.json#L6)). + + +## Known Issues + +The following is a list of known issues that will be fixed in the next rcs. + +- Source maps are missing in npm packages +- Generated bundles will be larger temporarily while we validate new code paths and remove old ones +- angular.io docs have not been updated to reflect API changes in 4.0 +- legacy UMD bundles don't have correct RxJS mappings when running in ES5 mode without a module system + + +## Installing RC.1 +We have two main ways to update. If you have an existing project, you should be able to run: + +On Linux/Mac: `npm install @angular/{common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router,animations}@next --save` +On Windows: `npm install @angular/common@next @angular/compiler@next @angular/compiler-cli@next @angular/core@next @angular/forms@next @angular/http@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/platform-server@next @angular/router@next @angular/animations@next --save` + + +Then run whatever `ng serve` or `npm start` command you normally use, and everything should work. + +*Please ensure that you are using Typescript v2.1.6 or higher.* + +*If you rely on Animations* you’ll also need to install the animations package `@angular/animations` and import the new `BrowserAnimationsModule` from `@angular/platform-browser/animations` in your root NgModule. Without this, your code will compile and run, but animations won’t activate. +Imports from `@angular/core` were deprecated, use imports from the new package `import { trigger, state, style, transition, animate } from '@angular/animations';`. + +## What's next? +We have [three more release candidates scheduled](https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md) before our planned GA the week of March 22. In the meantime we'll be looking for your feedback, fixing bugs and working on docs. + + +## Commit Summary + +### Features + +* **compiler:** Add a `enableLegacyTemplate` option to support `