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.
Angular2 doesn't seem to be working client side when publishing with VS Code #338
I'm running the ANGULAR2SPA app in VS Code and everything seems to be working fine with the exception of the following:
Increment button is not working/ (click)="function()" is completely removed on page load
Pages are reloading when switching between views
When I run the application from VS 2015 Professional, everything works perfectly. I disabled javascript in my browser and it works exactly as it did with "dotnet run" and VS Code. I checked the browser to make sure vendor.js was loaded. Is there anything in VS Code that would prevent would prevent javascript from running? Obviously I'm just working from VS 2015 but I use VS Code when working on a Mac so I wanted to know if anyone else experienced similar issues.
I'm not sure what browser you are using, but it sounds like you have JavaScript Disabled.
Otherwise, VSCode might not be compiling the webpack files & such properly, it could be something in your Launch.json?
In Chrome go into settings and make sure this is Unchecked:
Thanks for the quick reply, Mark. That's what I thought initially and that's why I tried disabling/enabling. I experienced this issue on both my Mac and PC when I cloned the repository. "dotnet run" from the command prompt/terminal gave me the same result. On the PC, I ran the same files in the same browser from Visual Studio 2015 with no problems. Not sure what could be the issue.
In most cases, VS Code is just a text editor and doesn't influence how your application runs. If you've set up some custom launch.json then that might affect it, so if so, try removing that and just running directly from the command line.
If that's not it, I'd need more information (ideally, repro steps) otherwise I'm not sure how it would be possible to proceed with diagnosing this. Sorry!
@levarcooper So potentially you might need to run webpack first (in command line), to build all the files, then do dotnet run I've had that happen to me before with projects & VSCode.
Are you running the base Repo here?
@MarkPieszak That was the problem. I ran webpack and everything worked perfectly. Of course, I did everything but that which actually makes sense hindsight. Thank you both for your help with this.
changed the title [-]Angular2 doesn't seem to be working client side[/-][+]Angular2 doesn't seem to be working client side when publishing with VS Code[/+]on Sep 29, 2016
Activity
MarkPieszak commentedon Sep 28, 2016
I'm not sure what browser you are using, but it sounds like you have JavaScript Disabled.
Otherwise, VSCode might not be compiling the webpack files & such properly, it could be something in your Launch.json?
In Chrome go into settings and make sure this is Unchecked:
levarcooper commentedon Sep 28, 2016
Thanks for the quick reply, Mark. That's what I thought initially and that's why I tried disabling/enabling. I experienced this issue on both my Mac and PC when I cloned the repository. "dotnet run" from the command prompt/terminal gave me the same result. On the PC, I ran the same files in the same browser from Visual Studio 2015 with no problems. Not sure what could be the issue.
SteveSandersonMS commentedon Sep 28, 2016
In most cases, VS Code is just a text editor and doesn't influence how your application runs. If you've set up some custom
launch.jsonthen that might affect it, so if so, try removing that and just running directly from the command line.If that's not it, I'd need more information (ideally, repro steps) otherwise I'm not sure how it would be possible to proceed with diagnosing this. Sorry!
MarkPieszak commentedon Sep 28, 2016
@levarcooper So potentially you might need to run
webpackfirst (in command line), to build all the files, then dodotnet runI've had that happen to me before with projects & VSCode.Are you running the base Repo here?
MrCrimp commentedon Sep 28, 2016
For me it was due to the environment variable not being set to 'Development' and webpack-dev-server fails to serve the in-memory script files.
Set environment explicitly to Development
For osx in terminal run:
ASPNETCORE_ENVIRONMENT=Development dotnet runFor VsCode try launching as sudo/administrator.
More info and options here #302
MarkPieszak commentedon Sep 28, 2016
I also think recent updates Steve made look they might make the default ENV Development, so things like this don't happen.
levarcooper commentedon Sep 28, 2016
@MarkPieszak That was the problem. I ran
webpackand everything worked perfectly. Of course, I did everything but that which actually makes sense hindsight. Thank you both for your help with this.[-]Angular2 doesn't seem to be working client side[/-][+]Angular2 doesn't seem to be working client side when publishing with VS Code[/+]johnazre commentedon Sep 30, 2016
I downloaded it yesterday and I was having issues with that until I set the environment to development.