fix(ivy): handle aliased Angular decorators (#29195)

Prior to this change the code didn't take into account the fact that decorators can be aliases while importing into a script. As a result, these decorators were not recognized by Angular and various failures happened because of that. Now we take aliases into account and resolve decorator name properly.

PR Close #29195
This commit is contained in:
Andrew Kushnir
2019-03-08 15:32:31 -08:00
committed by Kara Erickson
parent 99aa9674b2
commit 1d88c2bb81
10 changed files with 111 additions and 32 deletions

View File

@ -381,7 +381,7 @@ export class NgtscProgram implements api.Program {
// Set up the IvyCompilation, which manages state for the Ivy transformer.
const handlers = [
new BaseDefDecoratorHandler(this.reflector, evaluator),
new BaseDefDecoratorHandler(this.reflector, evaluator, this.isCore),
new ComponentDecoratorHandler(
this.reflector, evaluator, scopeRegistry, this.isCore, this.resourceManager,
this.rootDirs, this.options.preserveWhitespaces || false,