fix(upgrade): Prevent property renaming for $inject.

Switch to bracket notation for `directiveFactory.$inject`, otherwise Closure Compiler will (property) rename it, since the output type is `any`.
This commit is contained in:
David Purpura 2017-02-12 09:13:23 -08:00 committed by Igor Minar
parent 8c20aaa328
commit 96d06f7f09
1 changed files with 2 additions and 1 deletions

View File

@ -124,7 +124,8 @@ export function downgradeComponent(info: /* ComponentInfo */ {
};
};
directiveFactory.$inject = [$COMPILE, $INJECTOR, $PARSE];
// bracket-notation because of closure - see #14441
directiveFactory['$inject'] = [$COMPILE, $INJECTOR, $PARSE];
return directiveFactory;
}