Commit Graph

29 Commits

Author SHA1 Message Date
b64a276d4b refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371) (#23383)
Ivy definition looks something like this:

```
class MyService {
  static ngInjectableDef = defineInjectable({
    …
  });
}
```

Here the argument to `defineInjectable` is well known public contract which needs
to be honored in backward compatible way between versions. The type of the
return value of `defineInjectable` on the other hand is private and can change
shape drastically between versions without effecting backwards compatibility of
libraries publish to NPM. To our users it is effectively an opaque token.
For this reson why declare the return value of `defineInjectable` as `never`.

PR Close #23383
2018-04-14 20:40:14 -07:00
da31db757b feat(ivy): support injection even if no injector present (#23345)
- Remove default injection value from `inject` / `directiveInject` since
  it is not possible to set using annotations.
- Module `Injector` is stored on `LView` instead of `LInjector` data
  structure because it can change only at `LView` level. (More efficient)
- Add `ngInjectableDef` to `IterableDiffers` so that existing tests can
  pass as well as enable `IterableDiffers` to be injectable without
  `Injector`

PR Close #23345
2018-04-13 14:29:52 -07:00
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
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
6e5fb99304 refactor(ivy): flatten css selectors (#23074)
PR Close #23074
2018-03-30 15:27:50 -07:00
910a16a1ff refactor(ivy): remove directive references from template (#22986)
PR Close #22986
2018-03-26 22:33:23 -04:00
4f21d373b7 refactor(ivy): move hostBindings calls out of template (#22833)
PR Close #22833
2018-03-18 11:41:39 -07:00
b1365d1fa8 refactor(ivy): remove directiveRefresh instruction (#22745)
PR Close #22745
2018-03-13 23:29:21 -07:00
2fee5cc095 test(ivy): add injection canonical specs (#22595)
PR Close #22595
2018-03-08 12:09:39 -08:00
4c089c1d93 feat(ivy): support ChangeDetectorRef.detectChanges (#22614)
PR Close #22614
2018-03-07 21:08:25 -08:00
d485346d3c fix(ivy): lifecycle hooks should be queued for root component (#22614)
PR Close #22614
2018-03-07 21:08:25 -08:00
8c358844dd feat(ivy): support OnPush change detection (#22417)
PR Close #22417
2018-02-28 10:42:11 -08:00
aad431642a refactor(ivy): rename componentRefresh to directiveRefresh (#22395)
PR Close #22395
2018-02-23 09:42:08 -08:00
ac2b04a5ab test(ivy): Add small_app spec for sprint #3 (#22018)
PR Close #22018
2018-02-18 13:18:54 -08:00
10a014d89e refactor(ivy): prefix viewStart & viewEnd with embedded (#22055)
PR Close #22055
2018-02-07 17:03:25 -08:00
8feb8e5408 refactor(ivy): use long instruction format in tests (#22055)
PR Close #22055
2018-02-07 17:03:25 -08:00
1278cca883 perf(ivy): removes generation of comments (#21638)
PR Close #21638
2018-01-27 10:48:39 -08:00
811679a583 refactor(ivy): remove unnecessary Comp.r function (#21650)
PR Close #21650
2018-01-24 22:14:33 -08:00
98174758ad refactor(ivy): add type and hooks to directive def (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
e18f1de003 refactor(ivy): remove unnecessary D instruction (#21484)
PR Close #21484
2018-01-19 15:23:17 -08:00
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
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
a2f3f4550d test(core): properly stringify HTML elements in render3 tests (#21279)
PR Close #21279
2018-01-05 14:25:40 -08:00
d2cfc6a719 build: activate render3 tests in CI (#21279)
PR Close #21279
2018-01-05 14:25:40 -08:00
c516bc3b35 feat(core): add ngOnInit and ngDoCheck support in render3 (#21156)
PR Close #21156
2017-12-27 16:46:56 -06:00
5df343169e docs(core): add missing docs to component and fix formatting (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
764fea1344 test(core): animation renderer factory in render3 (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
d1de587ce0 feat(core): add renderer factory in render3 (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
0fa818b318 feat(core): Moving Renderer3 into @angular/core (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00