locked
Angular project not launching RRS feed

  • Question

  • User1421620300 posted

    Can someone explain to me why my Angular project fails to compile in Visual Studio Code? Im not sure what going wrong with my app. I am trying to build project with some add-ins and other packages like package json. because it asks for these packages.But every time i try to compile the project it does not show anything in the browser. It launches the browser but not shows anything in the browser.This behavior started occurring after i tried to update the html file of the project. I tried for a little while today to fix the problem but no piece of cake! I am confused also as to which command prompt or console that is hould be doing all of the updating to the proejct(Nod.js, Angular cli, or Commander for windows) I just found that I could launch the app also using Node.jc prompt but not sure if this is safe! Can someone make it clear to me what console should i really use, to be able to create and update my package's for Angular2 projects in Visual Studio Code editor. Also i would like some advice on the error it says the program successfully compiled but then still it wont launch in browser comes back empty. It gives me (cannot GET) error. Please help! Markus

    Sunday, June 24, 2018 1:46 AM

Answers

  • User283571144 posted

    Hi Markus33,

    Could you please tell me how you complie the angualr project in VS code?

    Do you install some extension for angualr in VS code?

    Do you complie it using the terminal or other way?

    It gives me (cannot GET) error. Please help! Markus

    Could you please post more details information about the "(cannot GET) error" ?

    Does it return any staus code and details error message?

    I suggest you could use F12 develop tool to see how the netowrk work for your angular project.

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 25, 2018 5:03 AM
  • User-474980206 posted

    assuming your using angular cli to build and get any errors its:

       ng build

    to run its:

       ng serve

    which also does a dev build and starts the test node web server. this also starts a file watcher, which uses web packs hot load to reload a page on changes. you just open the browser with the correct address. 

       http://localhost:4200/

    once you can manually do this, you should be able to setup your .vs/launch.json to do this. 

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 25, 2018 3:32 PM

All replies

  • User283571144 posted

    Hi Markus33,

    Could you please tell me how you complie the angualr project in VS code?

    Do you install some extension for angualr in VS code?

    Do you complie it using the terminal or other way?

    It gives me (cannot GET) error. Please help! Markus

    Could you please post more details information about the "(cannot GET) error" ?

    Does it return any staus code and details error message?

    I suggest you could use F12 develop tool to see how the netowrk work for your angular project.

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 25, 2018 5:03 AM
  • User-474980206 posted

    assuming your using angular cli to build and get any errors its:

       ng build

    to run its:

       ng serve

    which also does a dev build and starts the test node web server. this also starts a file watcher, which uses web packs hot load to reload a page on changes. you just open the browser with the correct address. 

       http://localhost:4200/

    once you can manually do this, you should be able to setup your .vs/launch.json to do this. 

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 25, 2018 3:32 PM