angular-cn/packages/core/test/bundling/injection
Pete Bacon Darwin 1a0e500eea fix(ivy): support sub-class services that only inherit `@Injectable` (#30388)
In View engine it is possible to instantiate a service that that has no
`@Injectable` decorator as long as it satisfies one of:

1) It has no dependencies and so a constructor with no parameters.
This is already supported in Ivy.
2) It has no constructor of its own and sub-classes a service which has
dependencies but has its own `@Injectable` decorator. This second
scenario was broken in Ivy.

In Ivy, previous to this commit, if a class to be instantiated did not have
its own `@Injectable` decorator and did not provide a constructor of
its own, then it would be created using `new` with no arguments -
i.e. falling back to the first scenario.

After this commit Ivy correctly uses the `ngInjectableDef` inherited
from the super-class to provide the `factory` for instantiating the
sub-class.

FW-1314

PR Close #30388
2019-05-15 14:10:33 -07:00
..
BUILD.bazel build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
bundle.golden_symbols.json fix(ivy): support sub-class services that only inherit `@Injectable` (#30388) 2019-05-15 14:10:33 -07:00
index.ts feat(ivy): @NgModule -> ngInjectorDef compilation (#22458) 2018-03-16 12:57:11 -07:00
treeshaking_spec.ts fix(core): Remove static dependency from @angular/core to @angular/compiler (#26734) 2018-10-31 14:15:06 -04:00
usage.ts refactor(ivy): migrate ɵɵ prefix back to Δ (#30362) 2019-05-14 16:52:15 -07:00