Spring boot, maven, AngularJS 2, typescript and live reboot

I am participating in a research phase for application development. Server-side development has already begun with Spring boot and Maven . Now I’m exploring possible client side development options.

I would like to use Angular 2 (I know that it is still in alpha), but I really hesitate between its javascript and typescript . I know that live reload with javascript version should work well with maven spring-boot run (theoretically) and this is a great help for performance. I was wondering if there is a live reload way for typescript versions of Angular too. Has anyone been able to implement it in their own project? If so, how did you do it?

I did not find a single document about this on maven- typescript -plugin

The build system will be Maven for the client side.

EDIT : Is there an easy way to debug typescript or is it a pain?

+6
source share
1 answer

One way could be to add a clock to start automatically whenever a file changes. For example, try adding the following to the package.json file:

 { "scripts": { "tsc": "tsc -p src -w" } } 

As Quickstart for Angular 2 (literally) it is indicated that this will be activated when you open the terminal window in the root of the application folder and enter:

 npm run tsc 

The script sets the parameter for the compiler (-w) , so the compiler remains alive when it is complete. It monitors changes in .ts files and recompiles them automatically.

Given this, spit out simple .js files, you can use convenient tools to reload the page.

+5
source

All Articles