I am currently working on a project in Visual Studio Community 2017 (15.2) that involves AngularJS 1.6.5 and a NancyFX server.
You can find the code for this project here: https://github.com/GusBeare/NancyAngularTests
This project serves as a learning playground for me, where I test out various features that I plan to implement in a real project.
All of the AngularJS code is stored in Typescript files, and my tsconfig.json file instructs the compiler to bundle it into a single JS file called Content/js/bundle.js
.
While everything works smoothly when I build and run the project, editing a .ts file while the application is running results in an error:
angular.min.js:7 Uncaught Error: [$injector:nomod]
http://errors.angularjs.org/1.6.5/$injector/nomod?p0=mySPA
Although the compile-on-save feature successfully rebuilds Content/js/bundle.js
upon saving changes, I still encounter the Angular error. Is there a mistake in my AngularJS code, or could this be related to Typescript/Visual Studio?
If I build and publish the project, it runs seamlessly under IIS without any issues.