Closed david-gang closed 4 years ago
What part is not valid javascript? What is that evalExpression function?
When an object is upgraded with ngupgrade it is "compiled": The evalexpression is from https://github.com/angular/angular/blob/d272f96e23f379e1b565435b3af010138e710ab9/modules/angular2/src/facade/lang.ts#L467
The part which is not valid is the brackets in the object key:
Here is a small example which shows the problem: (In chrome console) a = {} Object {} a.b = 5 5 a.c_[d = 6 VM245:3 Uncaught SyntaxError: Unexpected token }(…)
The upgrade adapter tries to compile a big function from the directive.
I want to upgrade an icon directive
Then if we have an input called icontype i get the following lines:
which is not valid javascript and therefore the function fails.