You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
@SteveSanderson would this template be ever migrated to the next Angular / ASP.NET Core version(s)?
Or the Angular-CLI template will be the way to go?
I was using the JavaScriptServices and would consider an upgrade, but dunno which direction to take. Any recommendations for resources to read?
usualy, from time to time, I was just updateing the template base and this fixed the issue ;)
Reacted by Stefan Schweiger, Cuiqs76, Luka Jerković, Aic-wp, Michael Washington, Maxim Crabbé, k11k2 and Ashish Patel
I'm confused about why upgrading to the new angular-cli version of the visual studio template isn't an option. It uses JavascriptServices just like the old template. The main difference is that the angular portion is compiled by angular-cli instead of the base angular compiler. I think most people prefer angular-cli. I think the base angular compiler is only used in advanced scenarios like replacing webpack with rollup or integrating with closure.
I didn't use the old template, so I'm probably missing something obvious here.
The new angular-cli template does support sourcemaps of .ts files. However, I personally prefer to turn sourcemaps off anyways & debug the compiled javascript. (making sure development isn't minified). For me it's easier to debug that way & there are also some issues that are hard to understand until you see the actual javascript code that was output by the typescript transpiler.
For me they've just always been generated, I had to specifically turn them off. However, I haven't used the old Angular+JavascriptServices VisualStudio template, only the new one.
Not sure of your exact setup, but one of these options might work:
#1) add --sourcemaps to the ng build or ng serve command (normally in package.json scripts).
This would only work if you're using angular-cli, and I think this is on by default anyway, because I use option --no-sourcemaps to intentionally turn it off.
#2) add this to tsconfig.json: "compilerOptions": { "sourceMap": true }
I assume this is how you do it if you're using the base angular compiler instead of angular-cli, but I'm not entirely sure, since I've always used angular-cli.
If you're using the old template & have manually upgraded to angular 5, I've never tried that scenario, so you'll have to research it :( Good luck!
Activity
speige commentedon Mar 7, 2018
IMO your best bet would be to switch to the angular-cli template. It already supports angular 5 & the newest .net core.
https://docs.microsoft.com/en-us/aspnet/core/spa/angular
JACrazy commentedon Mar 14, 2018
Since I'm making a service fabric project, I'm stuck using JavaScriptServices.
This is a good guide to follow for upgrading from Angular 4 to Angular 5:
http://www.talkingdotnet.com/upgrade-angular-4-app-angular-5-visual-studio-2017/
ADefWebserver commentedon Mar 14, 2018
@JACrazy How do you deal with the problem (in the comments of: http://www.talkingdotnet.com/upgrade-angular-4-app-angular-5-visual-studio-2017/)
that you cannot debug the .ts files in the web browser debugger (because the debug maps are not created)?
speige commentedon Mar 14, 2018
I'm confused about why upgrading to the new angular-cli version of the visual studio template isn't an option. It uses JavascriptServices just like the old template. The main difference is that the angular portion is compiled by angular-cli instead of the base angular compiler. I think most people prefer angular-cli. I think the base angular compiler is only used in advanced scenarios like replacing webpack with rollup or integrating with closure.
I didn't use the old template, so I'm probably missing something obvious here.
The new angular-cli template does support sourcemaps of .ts files. However, I personally prefer to turn sourcemaps off anyways & debug the compiled javascript. (making sure development isn't minified). For me it's easier to debug that way & there are also some issues that are hard to understand until you see the actual javascript code that was output by the typescript transpiler.
ADefWebserver commentedon Mar 14, 2018
@speige - Do you have any information on how I can turn on sourcemaps of .ts files? Thanks!
speige commentedon Mar 14, 2018
For me they've just always been generated, I had to specifically turn them off. However, I haven't used the old Angular+JavascriptServices VisualStudio template, only the new one.
Not sure of your exact setup, but one of these options might work:
#1) add --sourcemaps to the ng build or ng serve command (normally in package.json scripts).
This would only work if you're using angular-cli, and I think this is on by default anyway, because I use option --no-sourcemaps to intentionally turn it off.
#2) add this to tsconfig.json: "compilerOptions": { "sourceMap": true }
I assume this is how you do it if you're using the base angular compiler instead of angular-cli, but I'm not entirely sure, since I've always used angular-cli.
If you're using the old template & have manually upgraded to angular 5, I've never tried that scenario, so you'll have to research it :( Good luck!
ADefWebserver commentedon Mar 14, 2018
@speige - I used the new template and had problems, but, I will try your suggestions. Thank You
SteveSandersonMS commentedon Mar 23, 2018
@xagon I'd recommend using the newer Angular CLI-based template.