Undertaking upgrade of an AngularJS v1.25 to Angular 14, using the ng-Upgrade approach as described on angular.io/guide/upgrade. To make things even steeper, our app's main page is ASP.NET MVC 5. I would like to use the Angular CLI for the new Angular app. Not many tutorials or blogs leveraging all these techs in one place.
Our entire app at the moment uses zero typescript. Most tutorials seem to indicate moving all .js to .ts before you even migrate, or just (strangely) assume your 1.x app is already in TypeScript.
However, I'd rather not do that; renaming all the files and keeping git history is going to be a large undertaking. Forunately we used the AngularJS style guide and our code mostly conforms.
I see that the AngularJS application has to be "made a hybrid/ngUpgrade app" in order to be able to inject "downgraded" Angular components in the AngularJS. To do that, you have to have the @angular/upgrade module available in your app module.
- Can I get away with just upgrading app.js to app.ts so I can do the injection, and leave everything else as .js?
- Should I only be importing the new @angular stuff at the top project level, and then modifying the tsconfig.json in the subdir so it can find the modules in ../node_modules?