fix(upgrade): improve downgrading-related error messages (#26217)

Make the error messages thrown when instantiating downgraded components,
injectables and modules more descriptive and actionable, also taking
into account incorrect use of the `downgradedModule` field.

PR Close #26217
This commit is contained in:
George Kalpakas
2018-10-08 15:25:37 +03:00
committed by Kara Erickson
parent 93837e9545
commit 7dbc103cbe
12 changed files with 333 additions and 54 deletions

View File

@ -103,11 +103,15 @@ const appModule =
})
.directive('ng2A', downgradeComponent({
component: Ng2AComponent,
// Since there are more than one downgraded Angular module,
// specify which module this component belongs to.
downgradedModule: downgradedNg2AModule,
propagateDigest: false,
}))
.directive('ng2B', downgradeComponent({
component: Ng2BComponent,
// Since there are more than one downgraded Angular module,
// specify which module this component belongs to.
downgradedModule: downgradedNg2BModule,
propagateDigest: false,
}))