ngUpgrade - ng1 with es6 and ng2 with ts?
Hello all,
If I want to have my ng2 app written in ts, do I need to upgrade my ng1 app to ts too when using ngUpgrade (my ng1 app is wrotten now in es6)?
Thanks! Einav
No ... you can work around it (see https://angular.io/docs/ts/latest/cookbook/ts-to-js.html), pretty easily if you're willing to use ES6-with-decorators .
But we recommend upgrading to TypeScript as you go if you think you'll get there eventually.
Oh ... you won't be able to use AOT until you're in TypeScript. That's the current state of AOT and likely to remain so for a considerable time.
Oh ... we don't test the thesis that upgrade works without TypeScript. It seems like it should (as I said). But we don't have the resources to verify at the moment.
Hi @wardbell, would you please clarify something about your response. Are you saying the ng2 code used with ngUpgrade or the legacy ng1 code should use ES6-with-decorators if it isn't in TypeScript?
I'm in a similar situation as @seinavco where I have a legacy ng1 app that uses ES6 (babel) and webpack and I'm trying to migrate to ng2 via ngUpgrade without having to rewrite/convert all of my legacy ng1 code before moving it to ng2.
Thanks!