Commit Graph

576 Commits

Author SHA1 Message Date
Kara Erickson de3ca56769 fix(ivy): support separate creation mode and update mode execution in runtime (#23292)
PR Close #23292
2018-04-11 15:30:39 -07:00
Pete Bacon Darwin 4b96a58c5a docs: remove all deprecated `@stable` jsdoc tags (#23210)
These are no longer needed as stable docs are computed as those that
do not have `@experimental` or `@deprecated` tags.

PR Close #23210
2018-04-10 21:49:32 -07:00
Marc Laval c973830d9a refactor(ivy): clean projection support (#23287)
PR Close #23287
2018-04-10 13:16:01 -07:00
Miško Hevery f1db789450 test(ivy): update todo app to http://todomvc.com (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 50030f650b docs(ivy): update STATUS.md with outstanding work (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 3fb4e190a8 fix(ivy): correctly bind to component context (#23168)
When compiling templates the compiler would often bind to
closest context rather than the component context.

The only time one should be binding to the cont component is
in explicit cases where the inner template declares local variable.

PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 4f7fac0e03 test(ivy): cleanup todo test app (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 9a2479d423 fix(ivy): named listener method for easier debugging. (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 720031b5f6 docs(ivy): update outstanding work for todo (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Marc Laval bb3f0e5ed2 feat(ivy): support projection of ViewContainerRef (#23272)
PR Close #23272
2018-04-09 16:07:42 -07:00
paulmojicatech 60e8392722 docs(core): update directives documentation (#23255)
fix(release): wrong input names in bank-account component

Directive example has errors #22382

PR Close #23255
2018-04-09 15:19:10 -07:00
Marc Laval f4c56f4931 feat(ivy): implement some of the ViewContainerRef API (#23189)
PR Close #23189
2018-04-09 15:17:19 -07:00
Kara Erickson 628303d2cb fix(ivy): instantiate dirs in correct order (#23178)
PR Close #23178
2018-04-05 14:50:00 -07:00
Pawel Kozlowski d80e9304c6 fix(ivy): properly find RNode (#23193)
As we no longer create native (RNode) comment nodes for containers,
we need to execute logic for finding a next sibiling node with RNode
when inserting a view.

The mentioned logic need to be updated for the case of dynamically
created containers (LContainerNode). Indeed, we need to be able to
descend into dynamically inserted views while looking for a RNode.
To achieve this we need to have a pointer from a host LNode to a
dynamically created LContainerNode).

PR Close #23193
2018-04-05 14:47:50 -07:00
Pawel Kozlowski fc813f67f4 fix(ivy): fix issue with refreshing embedded views (#23164)
PR Close #23164
2018-04-05 10:14:02 -07:00
Victor Berchet 524e5d8ae7 refactor(ivy): adjust types (#23167)
PR Close #23167
2018-04-05 10:09:54 -07:00
Pete Bacon Darwin 8ea15b4f12 docs(core): remove unnecessary `{@link Injector}` jsdoc tag (#23185)
Inline code blocks are automatically linked, if possible, to their API
page.

PR Close #23185
2018-04-05 09:26:24 -07:00
Pete Bacon Darwin 7dc150c1e8 docs(core): migrate `@whatItDoes` tags to the description (#23185)
We get the overview for the doc by splitting off the first
paragraph.

PR Close #23185
2018-04-05 09:26:24 -07:00
Pete Bacon Darwin 5bb14a68d2 docs(core): migrate deprecated `@howToUse` tags (#23185)
These have now become `@usageNotes` but later they might be
moved into a section of the description.

PR Close #23185
2018-04-05 09:26:24 -07:00
Pawel Kozlowski 32a41bc738 test(ivy): fixes in the TodoMVC example (#23161)
- properly display initial checked state
- properly remove a todo

Please note that the 'archive' option still doesn't
work correctly as listening to component outputs doesn't
seem to work (onArchive() is never called).

PR Close #23161
2018-04-04 10:26:18 -07:00
Victor Berchet 5c8340aae0 refactor(ivy): misc refactoring (#23154)
PR Close #23154
2018-04-04 09:04:41 -07:00
JiaLi.Passion c560423b52 build: upgrade zone.js (#23108)
PR Close #23108
2018-04-04 08:24:02 -07:00
Victor Berchet 412b85ba89 docs: add a link to "Impact of polymorphism [...]" to the perf notes (#23151)
PR Close #23151
2018-04-04 08:22:28 -07:00
Aslan Vatsaev cae48df25b docs: Update PERF_NOTES.md (#23050)
PR Close #23050
2018-04-04 08:21:16 -07:00
Alex Rickabaugh fab6b39c3d fix(core): inject() should always work in an NgModule injection scope (#23148)
Currently the context for inject() is only set when the token is seen
for the first time. This has two issues:

* It should always be set when injecting from that injector, because
  a constructor may wish to call inject() directly.
* If an NgModuleFactory is .create()'d twice, and an ngInjectableDef
  token is requested from each of them, the second time will fail.
  This is because the first injection adds the provider definition
  and calls the factory, and the provider definitions are shared.
  The second injector will see the provider definition and call the
  factory to create an instance, but without setting the correct
  context for inject().

Fixes angular/material2#10586.

PR Close #23148
2018-04-03 10:59:36 -07:00
Alex Eagle 580f05bd9c build: flatten esm5 sources before rollup (#23131)
this is needed to update to latest rules_nodejs due to breaking change in
https://github.com/bazelbuild/rules_nodejs/pull/172
It has the side-effect of correctly marking rxjs packages as side-effect-free

PR Close #23131
2018-04-03 10:47:29 -07:00
Igor Minar 92724b396b build: update to rxjs@6.0.0-rc.0 (#23106)
PR Close #23106
2018-04-03 10:00:24 -07:00
Pawel Kozlowski fa2c9a81dd feat(ivy): ViewContainerRef basic scenarios support (#23021)
PR Close #23021
2018-04-03 09:35:14 -07:00
Miško Hevery 55c9fb298f test(ivy): create todo app in ivy (#22921)
PR Close #22921
2018-04-02 15:49:48 -07:00
Miško Hevery 60065935be refactor(ivy): align compiler with runtime (#22921)
Remove `containerRefreshStart` and `containerRefreshEnd` instruction
from the output.

Generate directives as a list in `componentDef` rather than inline into
instructions. This is consistent in making selector resolution runtime
so that translation of templates can follow locality.

PR Close #22921
2018-04-02 15:49:48 -07:00
Miško Hevery 4290ea4bb9 ci: update to latest rulse_nodejs (#22921)
PR Close #22921
2018-04-02 15:49:48 -07:00
Miško Hevery e7f1af3c54 refactor(ivy): cleanup necessary domino files (#22921)
PR Close #22921
2018-04-02 15:49:48 -07:00
Kara Erickson 85d3b591b6 refactor(ivy): generate pipe names instead of defs (#23104)
PR Close #23104
2018-04-02 09:42:44 -07:00
Kara Erickson 6e5fb99304 refactor(ivy): flatten css selectors (#23074)
PR Close #23074
2018-03-30 15:27:50 -07:00
Alex Eagle 15278784fc release(bazel): change publish-next script to publish bazel artifacts (#23097)
PR Close #23097
2018-03-30 14:03:05 -07:00
Igor Minar 22cb2c9441 build: add missing dependencies on @rxjs//operators needed for rxjs@6.0.0-beta.4 (#23084)
PR Close #23084
2018-03-30 13:07:03 -07:00
Igor Minar 3603a10ea2 build: update to zone.js@0.8.20 (#23084)
PR Close #23084
2018-03-30 13:07:03 -07:00
Igor Minar 6f7d14064c build: update to rxjs@6.0.0-beta.4 (#23084)
PR Close #23084
2018-03-30 13:07:03 -07:00
Kara Erickson e2e80ec61c refactor(ivy): remove pipe references from the template (#23032)
PR Close #23032
2018-03-28 09:17:27 -07:00
Kara Erickson 5a86f7144f fix(ivy): store local variables in data instead of calling loadDirective (#23029)
PR Close #23029
2018-03-28 09:17:05 -07:00
Alex Rickabaugh 884bf0ef09 fix: consistently rewrite Injector to INJECTOR (#23008)
In Ivy mode we rewrite references to Injector to INJECTOR in ngInjectableDef, to fix tree-shaking.

This changes the rewrite to happen always, even in non-Ivy mode, and makes Angular understand
INJECTOR across the board at runtime.

PR Close #23008
2018-03-28 09:14:32 -07:00
Olivier Combe d28ce50067 test(ivy): make sure `goog.getMsg()` is defined before being used (#22998)
PR Close #22998
2018-03-27 17:07:50 -04:00
Veres Lajos de90314304 style: typos fixed - https://github.com/vlajos/misspell-fixer (#22975)
PR Close #22975
2018-03-27 14:51:53 -04:00
Kara Erickson f739f756ce test(ivy): fix flaky tests (#23010)
PR Close #23010
2018-03-27 14:48:50 -04:00
Kara Erickson 910a16a1ff refactor(ivy): remove directive references from template (#22986)
PR Close #22986
2018-03-26 22:33:23 -04:00
Alex Rickabaugh 6f0191744c fix(core): don't override ngInjectableDef in the decorator if present on the type (#22943)
Previously, @Injectable() would generate an ngInjectableDef on the type it was
decorating, even if that type already had a compiled ngInjectableDef, overwriting
the compiled version.

PR Close #22943
2018-03-23 16:13:06 -04:00
Misko Hevery b9cbe83104 docs(ivy): update STATUS.md with compiler work breakdown (#22874)
PR Close #22874
2018-03-23 15:04:55 -04:00
Kara Erickson 49396ca2ae refactor(ivy): move directives into separate array (#22918)
PR Close #22918
2018-03-22 21:23:02 -04:00
Kara Erickson e44f69c387 refactor(ivy): move dir flags to tnode (#22901)
PR Close #22901
2018-03-22 19:19:40 -04:00
Olivier Combe 99711b12f9 test(core): hello world i18n demo (#22654)
PR Close #22654
2018-03-22 19:01:51 -04:00
Matias Niemelä d77bb460b0 revert: docs(ivy): update STATUS.md with compiler work breakdown (#22874)
This reverts commit b524e4b142.
2018-03-22 18:09:45 -04:00
Miško Hevery c84817970e fix(ivy): remove custom tsconfig from render3 (#22913)
PR Close #22913
2018-03-22 18:02:48 -04:00
Misko Hevery b524e4b142 docs(ivy): update STATUS.md with compiler work breakdown (#22874)
PR Close #22874
2018-03-22 18:01:38 -04:00
Miško Hevery 17fb9832f4 fix(ivy): fix type error in newer version of TS (#22897)
Newer version of TS is stricter about types and flags counter-variant
types in some  situations. This change inlines the DirectiveDefArgs
into the arguments which:
1) removes the inheritance which caused the issue and
2) Makes it more friendly to IDEs since they will not report comments.

Closes #22877
Closes #22843

PR Close #22897
2018-03-20 15:49:45 -07:00
Igor Minar 3cc5c2e4d0 build: update to rxjs@6.0.0-beta.0 (#22887)
PR Close #22887
2018-03-20 15:26:49 -07:00
Igor Minar 7d095b96cd fix: correct several esm2015 entry-points in package.jsons (#22892)
PR Close #22892
2018-03-20 13:30:08 -07:00
Alex Eagle 689f351092 build: expose flatModuleOutFile option on ng_module (#22814)
This lets projects like Material change ng_package "bundle index" files to non-conflicting paths

Currently packages like @angular/core ship with the generated metadata
in a path like 'core.js' which overwrites one of the inputs.

Angular material puts the generated file in a path like 'index.js'

Either way these files generated by ng_module rules have the potential
to collide with inputs given by the user, which results in an error.

Instead, give users the freedom to choose a different non-conflicting name.

Also this refactors the ng_package rule, removing the redundant
secondary_entry_points attribute.

Instead, we assume that any ng_module in the deps with a module_name
attribute is a secondary entry point.

PR Close #22814
2018-03-20 13:28:57 -07:00
Igor Minar b43f8bc7d3 feat(core): upgrade rxjs to 6.0.0-alpha.4 (#22573)
PR Close #22573
2018-03-19 21:51:51 -07:00
Misko Hevery fc50c77bd3 test(ivy): switch HelloWorld to ivy compiler (#22788)
PR Close #22788
2018-03-19 16:00:38 -07:00
Kara Erickson 1a0cb21538 refactor(ivy): remove unnecessary binding from hello world (#22848)
PR Close #22848
2018-03-19 16:29:45 -05:00
Igor Minar 0bede54b2d style: fix formatting issues on the master branch (#22854)
PR Close #22854
2018-03-18 14:03:26 -07:00
Kara Erickson e27cfd6236 refactor(ivy): split up directiveCreate for tree shaking (#22838)
PR Close #22838
2018-03-18 11:56:35 -07:00
Kara Erickson 1612985e48 refactor(ivy): allow tick and deps to be tree-shaken (#22838)
PR Close #22838
2018-03-18 11:47:44 -07:00
Kara Erickson 4f21d373b7 refactor(ivy): move hostBindings calls out of template (#22833)
PR Close #22833
2018-03-18 11:41:39 -07:00
Igor Minar ce63dc6f95 feat: update the package output of build.sh to APF v6 (#22808)
PR Close #22808
2018-03-18 09:33:51 -07:00
Miško Hevery f258ec67bf docs(ivy): update status of ivy (#22834)
PR Close #22834
2018-03-16 22:20:21 -07:00
Alex Rickabaugh 6ef9f2278f feat(ivy): @NgModule -> ngInjectorDef compilation (#22458)
This adds compilation of @NgModule providers and imports into
ngInjectorDef statements in generated code. All @NgModule annotations
will be compiled and the @NgModule decorators removed from the
resultant js output.

All @Injectables will also be compiled in Ivy mode, and the decorator
removed.

PR Close #22458
2018-03-16 12:57:11 -07:00
Chuck Jazdzewski cedc04c320 docs(ivy): document project status (#22751)
Moves the status reporting from the issue #21706 to a file that
can be updated as changes are being made. This addresses one of the
comments on the issue and allows better tracking of updates to this
status and changes made.

PR Close #22751
2018-03-16 11:27:15 -07:00
Kara Erickson bafdad9083 fix(ivy): cache local names and support multiple locals with same value (#22807)
PR Close #22807
2018-03-16 11:26:38 -07:00
Kara Erickson 9220521149 test(ivy): correct export tests and add query test (#22807)
PR Close #22807
2018-03-16 11:26:38 -07:00
Alex Eagle f9247e4b2e build: enable importHelpers in tsconfig (#22812)
This is the primary tsconfig file used for Bazel builds.
Previously, we enabled this option only for releases.

PR Close #22812
2018-03-15 21:16:03 -07:00
Igor Minar 44de10e2db feat: mark angular packages as side-effect free (#22785)
This flag is picked up by webpack v4 and used for more agressive optimizations.

Our code is already side-effect free, because that's what we needed for build-optimizer to work.

PR Close #22785
2018-03-15 14:52:40 -07:00
Victor Berchet 0ebd577db4 refactor(compiler): Drop support for the deprecated `<template>`. Use `<ng-template>` instead (#22783)
BREAKING CHANGE:

The `<template>` tag was deprecated in Angular v4 to avoid collisions (i.e. when
using Web Components).

This commit removes support for `<template>`. `<ng-template>` should be used
instead.

BEFORE:

    <!-- html template -->
    <template>some template content</template>

    # tsconfig.json
    {
      # ...
      "angularCompilerOptions": {
        # ...
        # This option is no more supported and will have no effect
        "enableLegacyTemplate": [true|false]
      }
    }

AFTER:

    <!-- html template -->
    <ng-template>some template content</ng-template>

PR Close #22783
2018-03-15 14:52:22 -07:00
Kara Erickson 4e6ac185e5 refactor(ivy): double size of DI bloom filter (#22775)
PR Close #22775
2018-03-15 14:49:39 -07:00
Kara Erickson e55bf8fa79 refactor(ivy): access component def through tData (#22771)
PR Close #22771
2018-03-15 14:49:23 -07:00
Alex Eagle 88b3198c80 feat(bazel): change ng_package rule to APF v6 (#22782)
Angular Package Format v6 stops bundling files in the esm5 and esm2015
directories, now that Webpack 4 can tree-shake per-file.

Adds some missing files like package.json to make packages closer to
what we publish today.

Refactor ng_package to be a type of npm_package and re-use the packaging
action from that rule.

PR Close #22782
2018-03-15 11:38:31 -07:00
Adam Plumer cd2ebd22fd fix(platform-server): add styles to elements correctly (#22527)
* Partially reverts #22263 due to lack of total spec compliance
  on the server
* Maintains the camel-case styles fix

PR Close #22527
2018-03-14 14:12:31 -07:00
Miško Hevery 112431db69 test(ivy): add canonical compiler spec for class/style (#22719)
Adds a stub for `elementStyle` and `elementClass` instruction
with a canonical spec for the compiler. The spec shows the the
compiler should be using `elementStyle` and `elementClass` instruction
in place of `[class]` and `[style]` bindings respectively.
PR Close #22719
2018-03-14 12:59:52 -07:00
Miško Hevery a0a01f1e1e refactor(ivy): rename class/style to make space for new instruction (#22719)
Rename:
- `elementClass` (short: `k`) => `elementClassNamed` (short: `kn`)
- `elementStyle` (short: `s`) => `elementStyleNamed` (short: `sn`)

Currently `[class.name]` is `elementClass(0, ‘name’, value)`. We would
like to introduce new binding `[class]` which needs a new instruction
ideally `elementClass(0, value)`. Doing the rename creates space
to create such an instruction in subsequent change.

PR Close #22719
2018-03-14 12:59:52 -07:00
Miško Hevery ae19d071bb test(ivy): add ComponentFixture for cleaner tests. (#22719)
PR Close #22719
2018-03-14 12:59:52 -07:00
Matias Niemelä f5a98f41fe fix(core): remove core animation import symbols (#22692)
This patch removes the deprecated support for animation
symbol imports from @angular/core.

BREAKING CHANGE: it is no longer possible to import
animation-related functions from @angular/core. All
animation symbols must now be imported from @angular/animations.

PR Close #22692
2018-03-14 12:23:51 -07:00
Pawel Kozlowski c09bd67aee fix(ivy): fix views manipulation logic (#22656)
This commit fixes a bug that would result in views insert / remove
even if a view needed only refresh operation.

The crux of the bug was that we were looking for a view to update
only in the LContainer.nextIndex position. This is incorrect as a
view with a given block id could be present later in the views
array (this happens if we about to remove a view in the middle of
the views array).

The code in this fix searches for a view to update in the views array and
can remove views in the middle of the views collection. Previously we
would remove views at the end of the collection only.

PR Close #22656
2018-03-14 12:07:15 -07:00
Michael Giambalvo 37fedd001c feat(core): add task tracking to Testability (#16863)
Allow passing an optional timeout to Testability's whenStable(). If
specified, if Angular is not stable before the timeout is hit, the
done callback will be invoked with a list of pending macrotasks.

Also, allows an optional update callback, which will be invoked whenever
the set of pending macrotasks changes. If this callback returns true,
the timeout will be cancelled and the done callback will not be invoked.

If the optional parameters are not passed, whenStable() will work
as it did before, whether or not the task tracking zone spec is
available.

This change also migrates the Testability unit tests off the deprecated
AsyncTestCompleter.

PR Close #16863
2018-03-14 08:48:48 -07:00
Kara Erickson b1365d1fa8 refactor(ivy): remove directiveRefresh instruction (#22745)
PR Close #22745
2018-03-13 23:29:21 -07:00
Miško Hevery 51027d73cc fix(ivy): Update rollup rule to prevent inlining symbols in debug. (#22747)
The new rollup rule disables inlining symbols in debug mode. This makes 
it look as if there would be more symbols but in reality these are the
symbols which are no longer being inlined.
PR Close #22747
2018-03-13 19:58:30 -07:00
Kara Erickson bd9d4df735 refactor(ivy): remove inputsPropertyName (#22716)
Closes #22591

PR Close #22716
2018-03-13 13:26:15 -07:00
Matias Niemelä 58b94e6f5e feat(animations): expose `element` and `params` within transition matchers (#22693)
PR Close #22693
2018-03-13 09:42:24 -07:00
Alex Rickabaugh db56836425 feat: tree-shakeable providers API updates (#22655)
Rename @Injectable({scope -> providedIn}).

Instead of {providedIn: APP_ROOT_SCOPE}, accept {providedIn: 'root'}.
Also, {providedIn: null} implies the injectable should not be added
to any scope.

PR Close #22655
2018-03-13 09:28:05 -07:00
Marc Laval f95730b8e2 fix(ivy): elements properties should not be stringified (#22683)
PR Close #22683
2018-03-12 13:16:05 -07:00
Chuck Jazdzewski 8449eb8d62 build: upgrade to TypeScript 2.7 (#22669)
Fixes: #21571

PR Close #22669
2018-03-12 09:27:23 -07:00
Kara Erickson aa7dba244b feat(ivy): support checkNoChanges (#22710)
PR Close #22710
2018-03-11 22:16:38 -07:00
Kara Erickson fa451bcd19 feat(ivy): support markForCheck (#22690)
PR Close #22690
2018-03-09 20:29:05 -08:00
Kara Erickson b26a90567c feat(ivy): support attaching and detaching views from change detection (#22670)
PR Close #22670
2018-03-08 23:44:33 -08:00
Kara Erickson 5412e10bcd docs(core): replace ancient live demos (#22665)
PR Close #22665
2018-03-08 16:43:14 -08:00
Igor Minar 489fec1299 feat: update tslib to 1.9.0 (#22667)
BREAKING CHANGE: after this change, npm and yarn will issue incompatible peerDependencies warning

We don't expect this to actually break an application, but the application/library package.json
will need to be updated to provide tslib 1.9.0 or higher.

PR Close #22667
2018-03-08 16:42:34 -08:00
Misko Hevery 2fee5cc095 test(ivy): add injection canonical specs (#22595)
PR Close #22595
2018-03-08 12:09:39 -08:00
Kara Erickson f13f4db9dc refactor(ivy): fix rebase error (#22661)
PR Close #22661
2018-03-08 11:37:42 -08:00
Kara Erickson 4c089c1d93 feat(ivy): support ChangeDetectorRef.detectChanges (#22614)
PR Close #22614
2018-03-07 21:08:25 -08:00
Kara Erickson d485346d3c fix(ivy): lifecycle hooks should be queued for root component (#22614)
PR Close #22614
2018-03-07 21:08:25 -08:00
Marc Laval f64ee15487 feat(ivy): implement pipes (#22254)
PR Close #22254
2018-03-07 20:58:48 -08:00