fix(ivy): allow building router with ngtsc (#24862)

This commit adds the ivy-local tag to //packages/router. Since the
router depends on //packages/upgrade, it makes that package
compatible with ngtsc as well.

PR Close #24862
This commit is contained in:
Alex Rickabaugh 2018-07-06 09:31:46 -07:00 committed by Victor Berchet
parent f58f3dc07a
commit 8a5cd2200a
4 changed files with 4 additions and 2 deletions

View File

@ -30,6 +30,7 @@ ng_package(
entry_point = "packages/router/index.js", entry_point = "packages/router/index.js",
tags = [ tags = [
"ivy-jit", "ivy-jit",
"ivy-local",
"release-with-framework", "release-with-framework",
], ],
deps = [ deps = [

View File

@ -27,6 +27,7 @@ ng_package(
entry_point = "packages/upgrade/index.js", entry_point = "packages/upgrade/index.js",
tags = [ tags = [
"ivy-jit", "ivy-jit",
"ivy-local",
"release-with-framework", "release-with-framework",
], ],
deps = [ deps = [

View File

@ -571,7 +571,7 @@ export class UpgradeAdapter {
}; };
// At this point we have ng1 injector and we have prepared // At this point we have ng1 injector and we have prepared
// ng1 components to be upgraded, we now can bootstrap ng2. // ng1 components to be upgraded, we now can bootstrap ng2.
@NgModule(ngModule) @NgModule({jit: true, ...ngModule})
class DynamicNgUpgradeModule { class DynamicNgUpgradeModule {
constructor() {} constructor() {}
ngDoBootstrap() {} ngDoBootstrap() {}

View File

@ -45,7 +45,7 @@ export class UpgradeNg1ComponentAdapterBuilder {
// TODO(tbosch): find or file a bug against TypeScript for this. // TODO(tbosch): find or file a bug against TypeScript for this.
const directive = {selector: selector, inputs: this.inputsRename, outputs: this.outputsRename}; const directive = {selector: selector, inputs: this.inputsRename, outputs: this.outputsRename};
@Directive(directive) @Directive({jit: true, ...directive})
class MyClass { class MyClass {
// TODO(issue/24571): remove '!'. // TODO(issue/24571): remove '!'.
directive !: angular.IDirective; directive !: angular.IDirective;