Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Upgrade to Angular 5 / dotnetcore2.1 #1549

Closed
k-krupka opened this issue Feb 23, 2018 · 8 comments
Closed

Upgrade to Angular 5 / dotnetcore2.1 #1549

k-krupka opened this issue Feb 23, 2018 · 8 comments

Comments

@k-krupka
Copy link

@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 ;)

@speige
Copy link

speige commented 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
Copy link

JACrazy commented 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
Copy link

@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
Copy link

speige commented 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
Copy link

@speige - Do you have any information on how I can turn on sourcemaps of .ts files? Thanks!

@speige
Copy link

speige commented 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
Copy link

@speige - I used the new template and had problems, but, I will try your suggestions. Thank You

@SteveSandersonMS
Copy link
Member

@xagon I'd recommend using the newer Angular CLI-based template.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants