851 Commits

Author SHA1 Message Date
Chuck Jazdzewski
d7eac7ee56 Revert "fix(router): navigating to the current location works (#19463)"
This reverts commit 43c5b638b96a0c63f041a0b31e4c646ead72341b.
2017-10-09 16:38:12 -07:00
Chuck Jazdzewski
d53b96f2a2 Revert "fix(router): do not call location.go when skipping a navigation (#19463)"
This reverts commit 66515412308138ad083bdd91ab2e80cd2bdf7fac.
2017-10-09 16:37:31 -07:00
Kapunahele Wong
79deeacbd7 docs(aio): add copy about ngNoForm to NgForm API doc (#19561)
PR Close #19561
2017-10-09 14:53:49 -07:00
vsavkin
6651541230 fix(router): do not call location.go when skipping a navigation (#19463)
Closes #18036

PR Close #19463
2017-10-09 11:45:13 -07:00
vsavkin
43c5b638b9 fix(router): navigating to the current location works (#19463)
Closes #13340

PR Close #19463
2017-10-09 11:45:13 -07:00
Matias Niemelä
c3a52697f5 perf(animations): reduce size of bundle by removing AST classes (#19539)
This CL refactors the animation AST code to make use of interfaces instead of classes. Given that interfaces are not persisted during runtime the removal of classes should nicely cut down on size for the animations-browser bundle.

-- before --
animations-browser.umd.js = 222kb
animations-browser.umd.min.js = 107kb

-- after --
animations-browser.umd.js = 213kb
animations-browser.umd.min.js = 102kb

PR Close #19539
2017-10-09 10:00:48 -07:00
Matias Niemelä
c4704c8abc fix(animations): properly support boolean-based transitions and state changes (#19279)
Closes #9396
Closes #12337

PR Close #19279
2017-10-09 10:00:32 -07:00
Chuck Jazdzewski
b1ca5d4ddf Revert "perf(animations): reduce size of bundle by removing AST classes (#19539)"
This reverts commit d5c9c5f183b1832d437a3307d2f367721f9d0136.
2017-10-06 18:16:30 -07:00
Chuck Jazdzewski
9fecd72f44 Revert "test(animations): test to see if triggers get cancelled on removal (#19532)"
This reverts commit f12e15e682acc0e9bb0722e3455e68acc6687ac6.
2017-10-06 18:15:26 -07:00
Chuck Jazdzewski
f4480d46b4 Revert "fix(animations): ensure animateChild() works with all inner leave animations (#19532)"
This reverts commit 1c77cdadaf8d1ac24751a218484a8a08c13bad18.
2017-10-06 18:15:22 -07:00
Chuck Jazdzewski
8e5b582b61 Revert "fix(router): navigating to the current location works (#19463)"
This reverts commit b67d574a9562d76ab0a838f4d1b42501e5c5f09b.
2017-10-06 18:15:19 -07:00
Chuck Jazdzewski
0cc87c5ba1 Revert "fix(router): do not call location.go when skipping a navigation (#19463)"
This reverts commit fdfa31798befb57d90770956cc95511d9b3b7bd1.
2017-10-06 18:15:16 -07:00
Chuck Jazdzewski
6aa7cc1d96 Revert "fix(animations): properly support boolean-based transitions and state changes (#19279)"
This reverts commit a8920eb774346d809e03d992c454de18664b1be0.
2017-10-06 18:15:08 -07:00
Matias Niemelä
a8920eb774 fix(animations): properly support boolean-based transitions and state changes (#19279)
Closes #9396
Closes #12337

PR Close #19279
2017-10-06 15:35:37 -07:00
vsavkin
fdfa31798b fix(router): do not call location.go when skipping a navigation (#19463)
Closes #18036

PR Close #19463
2017-10-06 15:35:25 -07:00
vsavkin
b67d574a95 fix(router): navigating to the current location works (#19463)
Closes #13340

PR Close #19463
2017-10-06 15:35:24 -07:00
Matias Niemelä
1c77cdadaf fix(animations): ensure animateChild() works with all inner leave animations (#19532)
Closes #18305

PR Close #19532
2017-10-06 15:35:13 -07:00
Matias Niemelä
f12e15e682 test(animations): test to see if triggers get cancelled on removal (#19532)
PR Close #19532
2017-10-06 15:35:13 -07:00
Matias Niemelä
d5c9c5f183 perf(animations): reduce size of bundle by removing AST classes (#19539)
This CL refactors the animation AST code to make use of interfaces instead of classes. Given that interfaces are not persisted during runtime the removal of classes should nicely cut down on size for the animations-browser bundle.

-- before --
animations-browser.umd.js = 222kb
animations-browser.umd.min.js = 107kb

-- after --
animations-browser.umd.js = 213kb
animations-browser.umd.min.js = 102kb

PR Close #19539
2017-10-06 15:34:57 -07:00
Chuck Jazdzewski
f83989bb0d fix(compiler-cli): produce smaller source maps for templates (#19578)
Assocating each template node with a the generated TypeScript
generated overly verbose source maps. Changed to creating a
source map entry per unique source span instead of each
unique template ast node.

Fixes: #19537

PR Close #19578
2017-10-06 14:48:25 -07:00
Tobias Bosch
81167d9c4a perf(compiler): speed up loading of summaries for bazel. (#19581)
For hazel, we have a specific way of writing summaries,
which we can leverage to make the deserialization faster.

PR Close #19581
2017-10-06 14:48:02 -07:00
Tobias Bosch
0b06ea177a perf(compiler): only type check input files when using bazel (#19581)
This helps hazel as it does not check libraries (e.g. the default lib) which are
not input files, but still checks `.d.ts` files that are inputs.

PR Close #19581
2017-10-06 14:48:02 -07:00
Alex Rickabaugh
f10f8db5fb fix(service-worker): several misc fixes for corner cases
This commit fixes several issues discovered through use in real apps.

* The sha1() function operated on text content, causing issues for binary-format files.
  A sha1Binary() function which operates on unparsed data now avoids any encoding issues.
* The characters '?' and '+' were not escaped in Glob-to-regex conversion previously, but
  are now.
* URLs from the browser contain the full origin, but were checked against the table of
  hashes from the manifest which only has the path for URLs from the same origin. Now the
  origin is checked and URLs are relativized to the domain root before comparison if
  appropriate.
* ngsw: prefix was missing from data groups, is now added.
* Occasionally servers will return a redirected response for an asset, and caching it could
  cause errors for navigation requests. The SW now handles this by detecting such responses
  and following the redirect manually, to avoid caching a redirected response.
* The request for known assets is now created from scratch from the URL before fetching from
  the network, in order to sanitize it and avoid carrying any special modes or headers that
  might result in opaque responses.
* Debugging log for troubleshooting.
* Avoid creating errors by returning 504 responses on error.
* Fix bug where idle queue doesn't run in some circumstances.
* Add tests for the above.
2017-10-05 13:27:31 -07:00
Alex Rickabaugh
b804d4bde5 Revert "fix(platform-browser): support customEqualityTesters when overriding Jasmine toEqual"
This reverts commit f580ffab4f004b5d3297d693429e0a5d1dd4345a.

Reason: broke a few existing tests.
2017-10-05 13:20:00 -07:00
Tobias Bosch
01f711281c fix(compiler): don’t use ng:// in AOT source maps, and never point to the original source file
This is important to not confuse users nor downstream tools that
consume our source maps. For generated content for which we don’t
have an original source file, we use the generated file now.

Fixes #19538
2017-10-04 16:20:55 -07:00
Tobias Bosch
5b5108363d refactor(compiler): remove stale metadata classes for animations
These are no longer needed as animations are a purely
runtime concept.
2017-10-04 16:20:55 -07:00
Vikram Subramanian
fbc9537952 perf(compiler): fix perf issue in loading aot summaries in jit compiler
The current `flattenSummaries` function re-process the same NgModule
summary even if it has been processed before. Certain modules like
CommonModule are repeated multiple times in the module tree and it is
expanded out every time.

This was making unit tests using AOT summaries really slow. This will
also slow down JIT bootstrap applications that load AOT summaries for
component libraries.

The fix is to remember which summaries were seen before and not to
process them again.
2017-10-04 15:04:23 -07:00
Vikram Subramanian
f580ffab4f fix(platform-browser): support customEqualityTesters when overriding Jasmine toEqual 2017-10-04 15:00:58 -07:00
Tobias Bosch
696af79dc7 fix(compiler): properly work on windows
Verified manually on a windows surface tablet.

Fixes #19492
2017-10-04 14:58:08 -07:00
Victor Berchet
0833b59aab refactor(core): add a checkIndex to the compiler view nodes
Each node now has two index: nodeIndex and checkIndex.

nodeIndex is the index in both the view definition and the view data.
checkIndex is the index in in the update function (update directives and update
renderer).

While nodeIndex and checkIndex have the same value for now, having both of them
will allow changing the structure of view definition after compilation (ie for
runtime translations).
2017-10-04 14:55:54 -07:00
Tobias Bosch
caa51950e8 fix(compiler): only don’t emit already emitted files in incremental compilation 2017-10-04 14:55:21 -07:00
Chuck Jazdzewski
f3f4c3d835 fix(compiler): disallow references for select and index evaluation
Also fixes an issue where enum values of 0 or '``' where not treated
correctly.

Fixes: #18170
2017-10-04 14:54:39 -07:00
Tobias Bosch
7c5ecb5b5c fix(compiler): also count generated files to determine whether to use single file emit 2017-10-03 09:57:12 -07:00
Tobias Bosch
1058b2a778 fix(compiler): always emit summaries for jit with ng_module bazel rule. 2017-10-03 09:57:12 -07:00
Tobias Bosch
c4129137e7 fix(compiler): set emitSkipped to false for incremental compilation 2017-10-03 09:57:12 -07:00
George Kalpakas
eef7d8aa11 fix(upgrade): call ngOnInit() after ngOnChanges() (on components with inputs)
Fixes #18913
2017-10-02 16:01:07 -07:00
George Kalpakas
617b3d2ba5 fix(upgrade): correctly run change detection when propagateDigest is false 2017-10-02 16:01:07 -07:00
George Kalpakas
546eb7d851 test(upgrade): ensure AngularJS is bootstraped inside the Angular zone in tests 2017-10-02 16:01:07 -07:00
George Kalpakas
29dbc3b67c refactor(upgrade): remove redundant call to appRef.detach()
Once  a `ViewRef` is attached to the `ApplicationRef`, destroying the corresponding `ComponentRef` will automatically detach the `ViewRef`.
2017-10-02 16:01:07 -07:00
George Kalpakas
4e6aa9c2db fix(upgrade): ensure downgraded components are destroyed in the Angular zone 2017-10-02 16:01:07 -07:00
Tobias Bosch
745b59f49c perf(compiler): only emit changed files for incremental compilation
For now, we always create all generated files, but diff them
before we pass them to TypeScript.

For the user files, we compare the programs and only emit changed
TypeScript files.

This also adds more diagnostic messages if the `—diagnostics` flag
is passed to the command line.
2017-10-02 08:24:50 -07:00
Tobias Bosch
b0868915ae perf(compiler): don’t emit summaries for jit by default
This re-adds the flag `enableSummariesForJit` to the compiler options
that already existed in Angular 4.
2017-10-02 08:24:50 -07:00
Tobias Bosch
0038712474 fix(compiler): add typings for COMPILED.
Note: This commit has to be synced into G3 again.
2017-09-29 09:26:38 -07:00
Tobias Bosch
db74f44a97 fix: don’t rely on goog.DEBUG but on COMPILED instead
`good.DEBUG` can also be true when using advanced compilation.

Attention: This change has be applied in G3 already as a local mod!
2017-09-29 09:26:38 -07:00
Alex Rickabaugh
d442b6855f feat(service-worker): introduce the @angular/service-worker package (#19274)
This service worker is a conceptual derivative of the existing @angular/service-worker maintained at github.com/angular/mobile-toolkit, but has been rewritten to support use across a much wider variety of applications.

Entrypoints include:

@angular/service-worker: a library for use within Angular client apps to communicate with the service worker.
@angular/service-worker/gen: a library for generating ngsw.json files from glob-based SW config files.
@angular/service-worker/ngsw-worker.js: the bundled service worker script itself.
@angular/service-worker/ngsw-cli.js: a CLI tool for generating ngsw.json files from glob-based SW config files.
2017-09-28 16:18:12 -07:00
Tobias Bosch
7c1d3e0f5a fix(compiler): make watch mode work with declaration: false
closes #19464
2017-09-28 14:21:05 -07:00
Tobias Bosch
2f6ae527d1 fix(compiler): make sure our out path calculation is correct 2017-09-28 14:20:20 -07:00
Tobias Bosch
ec2be5dccb fix(compiler): allow to use flat modules and summaries
The combination of flat modules, flat module redirects and summaries
lead to errors before.
2017-09-28 14:20:20 -07:00
Victor Berchet
14e8e88022 Revert "refactor(core): Change abstract get to readonly (#19226)"
This reverts commit 3aa3d5c5480cb8f0c1be61902aa15ce6a424c2eb.
2017-09-28 13:36:56 -07:00
Victor Berchet
6a9ce67714 Revert "refactor(core): Removed readonly getters and changed to readonly (#19225)"
This reverts commit 2b84b86fc08a4ecb3078bd8b3a1bfc7b07946b20.
2017-09-28 13:36:44 -07:00