Commit Graph

337 Commits

Author SHA1 Message Date
Pawel Kozlowski 1aa2947f70 feat(ivy): add support for attributes on ng-content nodes (#21935)
By adding attributes on the <ng-content> element template authors
can decide how content should be re-projected (or, in other words:
which selectors should match re-projected content).

PR Close #21935
2018-02-01 08:30:26 -08:00
Kara Erickson 81306c1f61 feat(ivy): add support for content query (#21912)
PR Close #21912
2018-01-31 10:19:15 -08:00
Kara Erickson 0365592119 test(ivy): add canonical view query example (#21912)
PR Close #21912
2018-01-31 10:19:15 -08:00
Pawel Kozlowski 285dd6be34 feat(ivy): observable QueryList (#21859)
PR Close #21859
2018-01-30 11:43:38 -08:00
Chuck Jazdzewski d364117aa8 fix(ivy): correct errors in template variable specification (#21759)
PR Close #21759
2018-01-27 10:49:30 -08:00
Pawel Kozlowski 6245637e81 fix(ivy): correct query read logic after merges (#21749)
PR Close #21749
2018-01-27 10:49:09 -08:00
David-Emmanuel Divernois 1278cca883 perf(ivy): removes generation of comments (#21638)
PR Close #21638
2018-01-27 10:48:39 -08:00
Victor Berchet 2af19c96f2 fix(core): fix retrieving the binding name when an expression changes (#21814)
fixes #21735
fixes #21788

PR Close #21814
2018-01-26 15:34:47 -08:00
Kara Erickson dcca799dbb fix(ivy): call onChanges before onInit (#21793)
PR Close #21793
2018-01-26 14:57:03 -08:00
Kara Erickson d3d3f7191a test(ivy): add canonical lifecycle example (#21793)
PR Close #21793
2018-01-26 14:57:03 -08:00
Pawel Kozlowski f9381e42de feat(ivy): implement QueryList array-related methods (#21778)
PR Close #21778
2018-01-25 22:19:43 -08:00
Pawel Kozlowski 5269ce287e feat(ivy): support deep queries through view boundaries (#21700)
PR Close #21700
2018-01-24 22:18:38 -08:00
Kara Erickson 3e03dbe576 refactor(ivy): flatten hooks and collapse LView hook properties (#21650)
PR Close #21650
2018-01-24 22:14:33 -08:00
Kara Erickson 33b338120c refactor(ivy): move onDestroys out of cleanup (#21650)
PR Close #21650
2018-01-24 22:14:33 -08:00
Kara Erickson 811679a583 refactor(ivy): remove unnecessary Comp.r function (#21650)
PR Close #21650
2018-01-24 22:14:33 -08:00
Kara Erickson 2c33d17609 refactor(ivy): move content and view hooks into TView (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
Kara Erickson 9c99e6a838 refactor(ivy): move init hooks into TView (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
Kara Erickson 98174758ad refactor(ivy): add type and hooks to directive def (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
Kara Erickson 97b928053d fix(ivy): correct onDestroy order for projected components (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
Kara Erickson 1fe55e252c feat(ivy): add afterContentInit and afterContentChecked to render3 (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
Kara Erickson 53ed4b4648 test(ivy): add missing lifecycle tests for projected components (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
Miško Hevery 1e9cd95f5c test(ivy): content projection canonical example (#21674)
PR Close #21674
2018-01-23 16:42:07 -08:00
Chuck Jazdzewski c65634215b feat(ivy): update specification to include template variables (#21677)
PR Close #21677
2018-01-23 13:32:57 -08:00
Alex Rickabaugh 0ad02de47e feat(ivy): support for the ngForOf directive, with tests (#21430)
Implement NgOnChangesFeature, ViewContainerRef, TemplateRef,
and the renderEmbeddedTemplate instruction, and wire together the
pieces required for the ngForOf directive to work.

PR Close #21430
2018-01-23 12:54:39 -08:00
Alex Rickabaugh 6472661ae8 refactor(ivy): avoid circular dep with query/di/instructions (#21430)
To prepare for pending ngForOf work, the dep from instructions -> query
should be broken. This will enable a dep from di -> instructions while
avoiding a di -> instructions -> query -> di cycle.

Analyzing this cycle also uncovered another problem: the implementation
of query() breaks tree-shaking through a hard dependency on DI concepts
of TemplateRef, ElementRef, ViewContainerRef. This is fundamentally due
to how query() can query for those values without any configuration.

Instead, this fix introduces the concept by employing the strategy
pattern, and redefining QueryReadType to pass a function which will
return one of the above values. This strategy is then used for 'read'
instead of an enum in cases where special values should be read from
the DI system.

PR Close #21430
2018-01-23 12:54:39 -08:00
Kara Erickson e18f1de003 refactor(ivy): remove unnecessary D instruction (#21484)
PR Close #21484
2018-01-19 15:23:17 -08:00
Chuck Jazdzewski 21e37e47c6 fix(ivy): update the compiler specification (#21656)
Also make a minor fix for directive definitions

PR Close #21656
2018-01-19 13:23:54 -08:00
Alex Eagle a1492a73ce build: Remove angular_src nested workspace (#21096)
PR Close #21096
2018-01-19 10:17:37 -08:00
Chuck Jazdzewski 47b7898697 Revert "fix(core): fix chained http call (#20924)"
This reverts commit 7e3f9a482a.
2018-01-17 15:28:21 -08:00
Xander Garbett d3bf54bdeb feat(core): add binding name to content changed error (#20352)
Adding the binding name to the error message recieved by the user gives
extra context on what exactly changed. The tests are also updated to
reflect the new error message.

PR Close #20352
2018-01-17 07:16:40 -08:00
Benjamin Ingberg 7e3f9a482a fix(core): fix chained http call (#20924)
Fixes an issue where chained http calls would prematurely call
testability whenStable callbacks after the first http call.

Fixes #20921

PR Close #20924
2018-01-17 07:13:57 -08:00
Kara Erickson efe545a878 refactor(ivy): add TView and TContainer (#21463)
PR Close #21463
2018-01-16 10:51:55 -08:00
Miško Hevery 5eaaac35a8 refactor(ivy): remove `type` from `DirectiveDef` (#21374)
This change makes the code cleaner for the user. It does mean
a little bit more work for us since we have to patch the `type` back
into the `DirectiveDef`. However since the patching happens only once
on startup it should not be significant.

PR Close #21374
2018-01-11 07:02:18 -08:00
Miško Hevery 16232f000f refactor(ivy): merged containerStart/containerEnd (#21374)
This separation is no longer needed since directives are now passed into the `container` as an array rather than as child functions of the `containerStart`

PR Close #21374
2018-01-11 07:02:18 -08:00
Misko Hevery 9f43f5f09e test(ivy): add canonical template translation examples (#21374)
This change creates a spec file which contains canonical examples
of how the template compiler will translate templates into expected
output.

PR Close #21374
2018-01-11 07:02:18 -08:00
Misko Hevery a6d41c47a9 refactor(ivy): move directive into elementStart (#21374)
We used to have a separate `directive` instruction for instantiating
directives. However, such an instruction requires that directives
are created in the correct order, which would require that template
compiler would have knowledge of all dependent directives. This
would break template compilation locality principle.

This change only changes the APIs to expected form but does
not change the semantics. The semantics will need to be corrected
in subsequent commits. The semantic change needed is to
resolve the directive instantiation error at runtime based on
injection dependencies.

PR Close #21374
2018-01-11 07:02:17 -08:00
Kara Erickson 6be9c0466c refactor(core): split up interface files in render3 (#21433)
PR Close #21433
2018-01-10 16:13:44 -08:00
Alex Eagle c4f02e21dd build: move repeated tsconfig attributes to a macro (#20964)
This helps ensure we use the same tsconfig.json file for all compilations.
Next steps are to make it the same tsconfig.json file used by the editor

PR Close #20964
2018-01-10 12:30:19 -08:00
Kara Erickson fc3e7e0381 refactor(core): create consistent naming scheme across classes (#21403)
PR Close #21403
2018-01-10 11:15:48 -08:00
Kara Erickson 3db91ffd96 feat(core): add ngAfterViewInit and ngAfterViewChecked support to render3 (#21266)
PR Close #21266
2018-01-09 14:18:17 -08:00
Marc Laval a2f3f4550d test(core): properly stringify HTML elements in render3 tests (#21279)
PR Close #21279
2018-01-05 14:25:40 -08:00
Marc Laval d2cfc6a719 build: activate render3 tests in CI (#21279)
PR Close #21279
2018-01-05 14:25:40 -08:00
Miško Hevery 9f538a6cac build: add karma tests for render3 (#21188)
PR Close #21188
2017-12-27 16:46:56 -06:00
Pawel Kozlowski 3750ea9dff feat(core): final adjustements to ngIvy read option for queries (#21187)
PR Close #21187
2017-12-27 16:46:56 -06:00
Pawel Kozlowski afd89ed8d9 fix(core): support read option when querying for types (#21187)
PR Close #21187
2017-12-27 16:46:56 -06:00
Pawel Kozlowski a62371c0eb feat(core): more read options for ngIvy queries (#21187)
PR Close #21187
2017-12-27 16:46:56 -06:00
Kara Erickson c516bc3b35 feat(core): add ngOnInit and ngDoCheck support in render3 (#21156)
PR Close #21156
2017-12-27 16:46:56 -06:00
Miško Hevery ae97920fe2 build: move _testing_init into tools; limit web_test concurrency (#21053)
PR Close #21053
2017-12-22 13:10:51 -08:00
Misko Hevery 47bcb5bc35 build(core): add bazel test targets for core (#21053)
- Add tests target for `test`, `test_node_only` and `test_web` in `core` package.
- Created a `_testing_init` pseudo package where bootstrap code for tests is kept.
- Moved `source_map_util` from `test` to `testing` so to prevent circular dependency.
- Removed `visibility:public` for testing `BUILD` packages.

PR Close #21053
2017-12-22 13:10:51 -08:00
Miško Hevery f3fc74ab67 build(core): remove `main()` from specs (#21053)
`main()` function used to be needed to support dart, since dart
Does not allow top level statements. Since we no longer use dart
The need for `main()` has been removed.

In preparation for `Basel` and standardized way of running tests
we are removing `main()`

PR Close #21053
2017-12-22 13:10:51 -08:00
Matias Niemelä 86a36eaadd fix(animations): avoid infinite loop with multiple blocked sub triggers (#21119)
This patch fixes animations so that if multiple sub @triggers are used
and are blocked by a parent animation then the engine will not lead
itself into an infinite loop.

PR Close #21119
2017-12-22 09:23:28 -08:00
Miško Hevery 5a7bf36723 build: fix circular dep between interface and l_node by merging (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Miško Hevery 66528a21f6 build: fix benchmarks for render3 (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Miško Hevery a77757277b build: yarn buildifier (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Pawel Kozlowski 4f05d022c1 feat(core): support 'read' option for ngIvy queries (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Kara Erickson 5df343169e docs(core): add missing docs to component and fix formatting (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Marc Laval 764fea1344 test(core): animation renderer factory in render3 (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Pawel Kozlowski bbdea96a66 refactor: remove import circular dependencies (#20855)
This PR fixes a circular dependency among those files in Renderer3:
`query` -> `di` -> `instructions` -> `query` -> ...

Looking at the above dependencies the `di` -> `instructions` import is
a problematic one. Previously `di` had an import from `instructions`
since we can known about "current node" only in `instructions`
(and we need "current node" to create node injector instances).

This commit refactors the code in the way that functions in the
`di` file don't depend on any info stored module-global variables
in `instructions`.

PR Close #20855
2017-12-21 21:40:58 -08:00
Marc Laval d1de587ce0 feat(core): add renderer factory in render3 (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Pawel Kozlowski 147aec43bd feat: support queries for elements with local names (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Miško Hevery 1f5049f30c style: fix formatting errors (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Kara Erickson 19eeba2281 refactor(core): rename instructions for consistency (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Miško Hevery 83b27bac17 style: fix formatting errors (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Kara Erickson b462f49ce7 refactor(core): renamed and split out interfaces (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Kara Erickson 8fdb1e09c1 refactor(core): store directive defs in static data (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Miško Hevery 93b00cceb6 refactor(core): store locals in main array in rederer3 (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Miško Hevery 0fa818b318 feat(core): Moving Renderer3 into @angular/core (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Olivier Combe b7738e1fe5 feat(core): add source to `StaticInjectorError` message (#20817)
Closes #19302
PR Close #20817
2017-12-12 11:56:06 -08:00
Matias Niemelä 13e663c232 fix(animations): ensure multi-level route leave animations are queryable (#20787)
Closes #19807

PR Close #20787
2017-12-08 13:44:01 -08:00
Matias Niemelä 46aa0a1cf6 fix(animations): properly recover and cleanup DOM when CD failures occur (#20719)
Closes #19093

PR Close #20719
2017-12-07 17:16:27 -08:00
Matias Niemelä 590d93b30d feat(animations): re-introduce support for transition matching functions (#20723)
Closes #18959

PR Close #20723
2017-12-07 17:16:09 -08:00
Alex Eagle ef534c0cc1 build: upgrade bazel rules to latest (#20768)
Add enough BUILD files to make it possible to
`bazel build packages/core/test`

Also re-format BUILD.bazel files with Buildifier.
Add a CI lint check that they stay formatted.

PR Close #20768
2017-12-07 11:27:50 -08:00
Matias Niemelä b78ada198a fix(animations): ensure DOM is cleaned up after multiple @trigger leave animations finish (#20740)
Closes #20541

PR Close #20740
2017-12-06 07:02:42 -08:00
Matias Niemelä c2b3792a3b fix(animations): ensure multi-level leave animations work (#19455)
PR Close #19455
2017-11-28 18:24:41 -06:00
Matias Niemelä b2a586cee1 fix(animations): ensure multi-level enter animations work (#19455)
PR Close #19455
2017-11-28 18:24:40 -06:00
Miško Hevery add5953aa1 Revert "fix(animations): ensure multi-level enter animations work (#19455)"
This reverts commit dd6237ecd9.
2017-11-28 15:08:44 -06:00
Miško Hevery 6b4c24020d Revert "fix(animations): ensure multi-level leave animations work (#19455)"
This reverts commit 1366762d12.
2017-11-28 15:08:31 -06:00
Matias Niemelä 1366762d12 fix(animations): ensure multi-level leave animations work (#19455)
PR Close #19455
2017-11-27 16:59:47 -06:00
Matias Niemelä dd6237ecd9 fix(animations): ensure multi-level enter animations work (#19455)
PR Close #19455
2017-11-27 16:59:46 -06:00
Matias Niemelä ffb6dbeefe fix(animations): always fire start and done callbacks in order for noop animations (#20570)
PR Close #20570
2017-11-22 12:36:28 -06:00
Matias Niemelä 0e012c9669 fix(animations): always fire inner trigger callbacks even if blocked by parent animations (#19753)
Closes #19100

PR Close #19753
2017-11-22 10:38:02 -06:00
Chuck Jazdzewski dcfffbf828 build: fix build failures (#20470) 2017-11-15 22:33:30 -08:00
Alex Eagle 5ec1717c58 fix: Update test code to type-check under TS 2.5 (#20175)
PR Close #20175
2017-11-15 18:12:16 -06:00
Miško Hevery f8658cdc38 Revert "fix(animations): always fire inner trigger callbacks even if blocked by parent animations (#19753)"
This reverts commit d47b2a6f70.
2017-11-15 17:04:22 -06:00
Matias Niemelä d47b2a6f70 fix(animations): always fire inner trigger callbacks even if blocked by parent animations (#19753)
Closes #19100

PR Close #19753
2017-11-14 15:59:47 -08:00
Matias Niemelä 20aafff092 fix(animations): ensure final state() styles are applied within @.disabled animations (#20267)
Closes #20266

PR Close #20267
2017-11-14 11:01:11 -08:00
Chuck Jazdzewski 24cf8b3269 fix(core): ensure init lifecycle events are called (#20258)
Throwing an exception in a lifecycle event will delay but not
prevent an Init method, such as `ngOnInit`, `ngAfterContentInit`,
or `ngAfterViewInit`, from being called. Also, calling `detectChanges()`
in a way that causes duplicate change detection (such as a
child component causing a parent to call `detectChanges()` on its
own `ChangeDetectorRef`, will no longer prevent change `ngOnInit`,
`ngAfterContentInit` and `ngAfterViewInit` from being called.

With this change lifecycle methods are still not guarenteed to be
called but the Init methods will be called if at least one change
detection pass on its view is completed.

Fixes: #17035

PR Close #20258
2017-11-10 13:47:39 -08:00
Victor Berchet 6e8e3bd248 refactor(core): misc changes and integrate review feedback on #19996
closes #20224
2017-11-06 14:13:02 -08:00
Tobias Bosch a460066972 feat(compiler): introduce `TestBed.overrideTemplateUsingTestingModule`
This allows to overwrite templates for JIT and AOT components alike.

In contrast to `TestBed.overrideTemplate`, the template is compiled
in the context of the testing module, allowing to use other testing
directives.

Closes #19815
2017-11-06 14:12:30 -08:00
Tobias Bosch 05d96dc507 feat(core): allow to pass in aot summaries also to `TestBed.configureTestingModule`
Also adds caching for summaries.

Closes #19817.
2017-11-06 14:12:30 -08:00
Victor Berchet f0764016f9
revert: feat(core): add source to `StaticInjectorError` message (#19482) (#20171)
This reverts commit faa621218e.
2017-11-03 14:51:06 -07:00
Olivier Combe faa621218e feat(core): add source to `StaticInjectorError` message (#19482) 2017-11-03 11:14:05 -07:00
Matias Niemelä c0cc6eeca1 test(animations): ensure :enter callbacks fire on container insertion (#19674)
PR Close #19674
2017-10-18 11:18:08 -07:00
Tobias Bosch 30ecb6e88a Revert "test(animations): ensure :enter callbacks fire on container insertion (#19674)"
This reverts commit 41f57affb6.
As it was synched together with 5a9ed2de27
which broke an internal test.
2017-10-18 09:57:56 -07:00
Tobias Bosch 8d735da5d8 Revert "fix(animations): always fire inner trigger callbacks even if blocked by parent animations (#19753)"
This reverts commit 5a9ed2de27.
As it broke an internal test.
2017-10-18 09:56:59 -07:00
Matias Niemelä 5a9ed2de27 fix(animations): always fire inner trigger callbacks even if blocked by parent animations (#19753)
Closes #19100

PR Close #19753
2017-10-17 20:57:57 -07:00
Matias Niemelä 41f57affb6 test(animations): ensure :enter callbacks fire on container insertion (#19674)
PR Close #19674
2017-10-17 20:57:48 -07:00
Matias Niemelä d035175cdb fix(animations): ensure inner :leave animations do not remove node when skipped (#19532) (#19693)
PR Close #19693
2017-10-16 11:13:58 -07:00
Matias Niemelä f42d317d2f fix(animations): ensure animateChild() works with all inner leave animations (#19006) (#19532) (#19693)
PR Close #19693
2017-10-16 11:13:58 -07:00
Chuck Jazdzewski 46992b4bda Revert "fix(animations): ensure animateChild() works with all inner leave animations (#19006) (#19532)"
This reverts commit 9130505b57.
2017-10-11 10:51:52 -07:00
Chuck Jazdzewski d0af45c31a Revert "fix(animations): ensure inner :leave animations do not remove node when skipped (#19532)"
This reverts commit ac50bd678e.
2017-10-11 10:37:12 -07:00
Matias Niemelä ac50bd678e fix(animations): ensure inner :leave animations do not remove node when skipped (#19532)
PR Close #19532
2017-10-10 12:41:47 -07:00
Matias Niemelä 9130505b57 fix(animations): ensure animateChild() works with all inner leave animations (#19006) (#19532)
Closes #18305

PR Close #19532
2017-10-10 12:41:47 -07:00
Tobias Bosch 6ade68cff1 fix(compiler): correctly instantiate eager providers that are used via `Injector.get` (#19558)
Closes #15501

PR Close #19558
2017-10-10 10:15:46 -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 9fecd72f44 Revert "test(animations): test to see if triggers get cancelled on removal (#19532)"
This reverts commit f12e15e682.
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 1c77cdadaf.
2017-10-06 18:15:22 -07:00
Chuck Jazdzewski 6aa7cc1d96 Revert "fix(animations): properly support boolean-based transitions and state changes (#19279)"
This reverts commit a8920eb774.
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
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
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
Matias Niemelä 86ffacf7ce feat(animations): support negative query option values
closes #19259
2017-09-26 12:02:56 -07:00
Matias Niemelä b54368bf35 fix(animations): properly support the query limit option value
Closes #19232
2017-09-26 12:02:43 -07:00
Olivier Combe 0f5c70d563 build: update npm dependencies (#19328)
PR Close #19328
2017-09-22 13:20:52 -07:00
Miško Hevery 344a5ca545 feat(core): support for bootstrap with custom zone (#17672)
PR Close #17672
2017-09-21 16:51:48 -07:00
Olivier Combe b6431c60e6 refactor: core, http & platform-webworker to remove public private class separation (#19143)
The private classes `ApplicationRef_`, `PlatformRef_`, `JSONPConnection_`, `JSONPBackend_`, `ClientMessageBrokerFactory_`, `ServiceMessageBroker_`, `ClientMessageBroker_` and `ServiceMessageBrokerFactory_` have been removed and merged into their public equivalents.

The size of the minified umd bundles have been slightly decreased:
| package            | before     | after      |
| -------------------|------------|------------|
| core               | 217.791 kb | 217.144 kb |
| http               | 33.260 kb  | 32.838 kb  | 
| platform-webworker | 56.015 kb  | 54.933 kb  |
PR Close #19143
2017-09-14 13:38:06 -04:00
Yi Qi 97cc6caa33 fix(upgrade): add testability hook to downgraded component
Add testability hook to downgraded component so that protractor can wait for asynchronous call to complete.
Add unregisterApplication() and unregisterAllApplications() to testability registry for cleaning up testability and unit test.
2017-09-12 16:59:27 -04:00
Tobias Bosch ca5aebaa6b refactor: update angular to support TypeScript 2.4
Detailed updates:
- rxjs@5.0.x
- tsickle@0.24.x
- typescript@2.4.x
- @bazel/typescript@0.10.0
- protractor@5.1.x
- selenium-webdriver@3.0.x

BREAKING CHANGE:
- the Angular compiler now requires TypeScript 2.4.x.
2017-09-12 10:31:30 -07:00
Miško Hevery 15945c8791 Revert "fix(animations): ensure animateChild() works with all inner leave animations (#19006)"
This reverts commit a95e03ae85.
2017-09-05 23:08:26 -05:00
Matias Niemelä a95e03ae85 fix(animations): ensure animateChild() works with all inner leave animations (#19006)
Closes #18305

PR Close #19006
2017-09-05 15:33:50 -05:00
JiaLi.Passion ed1175f27e fix(platform-browser): simple version of zone aware addEventListener (#18993)
PR Close #18993
2017-09-05 15:33:22 -05:00
Marc Laval 36d37cc6ae fix(core): complete EventEmitter in QueryList on component destroy (#18902)
Fixes #18741

PR Close #18902
2017-09-01 16:27:58 -05:00
Olivier Combe 56238fe94e feat(compiler): set `enableLegacyTemplate` to false by default (#18756)
BREAKING CHANGE: the compiler option `enableLegacyTemplate` is now disabled by default as the `<template>` element has been deprecated since v4. Use `<ng-template>` instead. The option `enableLegacyTemplate` and the `<template>` element will both be removed in Angular v6.
PR Close #18756
2017-08-31 18:38:34 -07:00
Matias Niemelä fcadeb2079 fix(animations): do not leak DOM nodes/styling for host triggered animations (#18853)
Closes #18606

PR Close #18853
2017-08-31 18:38:27 -07:00
Matias Niemelä 409688fe17 feat(animations): report errors when invalid CSS properties are detected (#18718)
Closes #18701

PR Close #18718
2017-08-21 20:38:22 -05:00
Olivier Combe 5a1b9a34df style(animations): format integration spec (#18805) 2017-08-21 11:07:28 -07:00
Matias Niemelä 70628112e8 fix(animations): restore auto-style support for removed DOM nodes (#18787)
PR Close #18787
2017-08-18 23:31:10 -05:00
Matias Niemelä e25f05ae7c fix(animations): make sure @.disabled respects disabled parent/sub animation sequences (#18715)
Prior to this fix if @parent and @child animations ran at the same
time within a disabled region then there was a chance that a @child
sub animation would never complete. This would cause *directives to
never close a removal when a @child trigger was placed on them. This
patch fixes this issue.

PR Close #18715
2017-08-18 23:30:28 -05:00
Matias Niemelä 791c7efe29 fix(animations): ensure animations are disabled on the element containing the @.disabled flag (#18714)
Prior to fix this fix, @.disabled would only work to disable child
animations. Now it will also disable animations for the element that has
the @.disabled flag (which makes more sense).

PR Close #18714
2017-08-18 23:28:07 -05:00
Matias Niemelä 2159342038 feat(animations): allow @.disabled property to work without an expression (#18713)
PR Close #18713
2017-08-18 23:28:04 -05:00
Marc Laval f53f7241a0 fix(core): correct order in ContentChildren query result (#18326)
Fixes #16568

PR Close #18326
2017-08-18 22:27:30 -05:00
Tobias Bosch 0cc77b4a69 refactor(compiler): split compiler and core (#18683)
After this, neither @angular/compiler nor @angular/comnpiler-cli depend
on @angular/core.

This add a duplication of some interfaces and enums which is stored
in @angular/compiler/src/core.ts

BREAKING CHANGE:
- `@angular/platform-server` now additionally depends on
  `@angular/platform-browser-dynamic` as a peer dependency.


PR Close #18683
2017-08-16 17:58:53 -05:00
Jeremy Elbourn 3a500981ef feat(compiler): allow multiple exportAs names
This change allows users to specify multiple exportAs names for a
directive by giving a comma-delimited list inside the string.

The primary motivation for this change is to allow these names to be
changed in a backwards compatible way.
2017-08-16 15:31:48 -07:00
Pawel Kozlowski 77747e10c0 refactor(core): remove toString() method from DefaultIterableDiffer
toString() from DefaultIterableDiffer is only used in tests and should not
be part of the production code. toString() methods from differs add
~ 0.3KB (min+gzip) to the production bundle size.
2017-08-15 16:29:44 -07:00
Pawel Kozlowski d2c0d986d4 perf(core): add option to remove blank text nodes from compiled templates 2017-08-14 13:26:16 -07:00
Miško Hevery cac130eff9 perf(core): Remove decorator DSL which depends on Reflect
BREAKING CHANGE

It is no longer possible to declare classes in this format.

```
Component({...}).
Class({
  constructor: function() {...}
})
```

This format would only work with JIT and with ES5. This mode doesn’t
allow build tools like Webpack to process and optimize the code, which
results in prohibitively large bundles. We are removing this API
because we are trying to ensure that everyone is on the fast path by
default, and it is not possible to get on the fast path using the ES5
DSL. The replacement is to use TypeScript and `@Decorator` format.

```
@Component({...})
class {
  constructor() {...}
}
```
2017-08-11 09:27:07 -07:00
Marc Laval 2f9d8ff46d test(animations): disable buggy test in Chrome 39 (#18483)
Fixes #15793
2017-08-09 14:15:40 -07:00
Marc Laval e54bd59f22 fix(core): forbid destroyed views to be inserted or moved in VC (#18568)
Fixes #17780
2017-08-09 14:11:51 -07:00
Miško Hevery fcadbf4bf6 perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.

Code savings for HelloWorld using Closure:

Reflective: bundle.js:  105,864(34,190 gzip)
    Static: bundle.js:  154,889(33,555 gzip)
                            645( 2%)

BREAKING CHANGE:

`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.

Example:
Before:
```
[
  MyClass,
  {provide: ClassA, useClass: SubClassA}
]

```

After:
```
[
  {provide: MyClass, deps: [Dep1,...]},
  {provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```

NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.

Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.

DEPRECATION:

- `ReflectiveInjector` is now deprecated as it will be remove. Use
  `Injector.create` as a replacement.

closes #18496
2017-08-07 15:42:34 -07:00
Miško Hevery d9d00bd9b5 feat(core): Create StaticInjector which does not depend on Reflect polyfill. 2017-08-07 15:40:15 -07:00
Matias Niemelä 05472cb21b fix(animations): support persisting dynamic styles within animation states (#18468)
Closes #18423
Closes #17505
2017-08-07 11:40:04 -07:00
Matias Niemelä c0c03dc4ba fix(animations): revert container/queried animations accordingly during cancel (#18516) 2017-08-07 11:38:30 -07:00
Victor Berchet 9479a106bb build: enable TSLint on the packages folder 2017-07-31 15:47:57 -07:00
Miško Hevery 6279e50d78 perf(core): use native addEventListener for faster rendering. (#18107)
Angular can make many assumptions about its event handlers. As a result
the bookkeeping for native addEventListener is significantly cheaper
than Zone's addEventLister which can't make such assumptions.

This change bypasses the Zone's addEventListener if present and always
uses the native addEventHandler. As a result registering event listeners
is about 3 times faster.

PR Close #18107
2017-07-25 15:35:44 -05:00
Miško Hevery b7a6f52d59 perf: latest tsickle to tree shake: abstract class methods & interfaces (#18236)
In previous version of tsickle abstract class methods were materialized.
The change resulted in 6Kb savings in angular.io bundle.

This change also required the removal of `@private` and `@return` type
annotation as it is explicitly dissalowed by tsickle.

NOTE: removed casts in front of `makeDecorator` due to:
https://github.com/angular/devkit/issues/45

```
 14938 Jul 19 13:16 0.b19e913fbdd6507d346b.chunk.js
  1535 Jul 19 13:16 inline.d8e019ea3cfdd86c2bd0.bundle.js
589178 Jul 19 13:16 main.54c97bcb6f254776b678.bundle.js
 34333 Jul 19 13:16 polyfills.4a3c9ca9481d53803157.bundle.js

 14938 Jul 18 16:55 0.b19e913fbdd6507d346b.chunk.js
  1535 Jul 18 16:55 inline.0c83abb44fad9a2768a7.bundle.js
582786 Jul 18 16:55 main.ea290db71b051813e156.bundle.js
 34333 Jul 18 16:55 polyfills.4a3c9ca9481d53803157.bundle.js

main savings: 589178 - 582786 = 6,392
```

PR Close #18236
2017-07-21 16:35:37 -05:00
Vikram Subramanian 7ae7573bc8 fix(core): invoke error handler outside of the Angular Zone (#18269)
In Node.JS console.log/error/warn functions actually resuls in a socket
write which in turn is considered by Zone.js as an async task.

This means that if there is any exception during change detection in a platform-server
application the error handler will make the Angular Zone unstable which
in turn will cause change detection to run on next tick and cause an
infinite loop.

It is also better to run the error handler outside of the Angular Zone
in general on all platforms so that an error in the error handler itself doesn't cause an
infinite loop.

Fixes #17073, #7774.

PR Close #18269
2017-07-21 16:35:23 -05:00
Vikram Subramanian a094769bca fix(platform-server): don't clobber parse5 properties when setting (#18237)
element properties.

Fixes #17050.

We now store all element properties in a separate 'properties' bag.

PR Close #18237
2017-07-20 17:46:37 -05:00
Matias Niemelä 6f45519d6f feat(animations): support :increment and :decrement transition aliases 2017-07-19 11:24:00 -07:00
Matias Niemelä 5344be5182 fix(animations): make sure @.disabled works in non-animation components
Note 4.3 only!

Prior to this fix when [@.disabled] was used in a component that
contained zero animation code it wouldn't register properly because the
renderer associated with that component was not an animation renderer.
This patch ensures that it gets registered even when there are no
animations set.
2017-07-18 16:37:04 -07:00