angular-cn/packages/platform-browser
Alex Rickabaugh 60aeee7abf feat(ivy): selector side of ModuleWithProviders via type metadata (#24862)
Within an @NgModule it's common to include in the imports a call to
a ModuleWithProviders function, for example RouterModule.forRoot().
The old ngc compiler was able to handle this pattern because it had
global knowledge of metadata of not only the input compilation unit
but also all dependencies.

The ngtsc compiler for Ivy doesn't have this knowledge, so the
pattern of ModuleWithProviders functions is more difficult. ngtsc
must be able to determine which module is imported via the function
in order to expand the selector scope and properly tree-shake
directives and pipes.

This commit implements a solution to this problem, by adding a type
parameter to ModuleWithProviders through which the actual module
type can be passed between compilation units.

The provider side isn't a problem because the imports are always
copied directly to the ngInjectorDef.

PR Close #24862
2018-07-20 11:48:35 -07:00
..
animations fix(animations): @internal must use JSDoc tags. (#24928) 2018-07-18 18:18:04 -04:00
src feat(ivy): selector side of ModuleWithProviders via type metadata (#24862) 2018-07-20 11:48:35 -07:00
test refactor: infer type for `it()` assertion functions (#19904) 2018-07-06 13:48:02 -07:00
testing test: make `NgMatchers` type-aware (#19904) 2018-07-06 13:48:02 -07:00
BUILD.bazel build(ivy): enable ngtsc AOT builds for a few packages (#24738) 2018-07-12 16:36:35 -04:00
index.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
package.json feat: update the package output of build.sh to APF v6 (#22808) 2018-03-18 09:33:51 -07:00
public_api.ts build: publish tree of files rather than FESMs (#18541) 2017-08-31 15:34:50 -07:00
rollup.config.js feat: update the package output of build.sh to APF v6 (#22808) 2018-03-18 09:33:51 -07:00
tsconfig-build.json fix: don’t use the global `ng` at all with closure enhanced optimizations 2017-09-27 10:09:56 -07:00