Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

angular-cli #2636


User avatar
0
fguo created

Since I cannot pass through "Merging Client and Server Solution" (see my another post), I like to try angular-cli. I downloaded a "ASP.NET Core & Angular 2.x" project. It contains two folders: Client and Server. The documentation states "Client folder contains the Angular application which is configured to work with angular-cli", but I cannot find the instruction how to combine the Client folder with angular-cli.

I have installed angular-cli, and created/run a new project successfully. I wonder how to use angular-cli with the existing Client folder. Can you provide a brief instruction?

Thanks,


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I have replied your other post. For this one, follow below steps to run angular project with angular-cli

    1. First install yarn here <a class="postlink" href="https://yarnpkg.com/">https://yarnpkg.com/</a>
    2. Open a command promt and navigate to root of Client folder.
    3. run "yarn install" command (remove node_module folders if it already exists)
    4. then run "npm start" command to start your angular application.

    Please let us know if it does not work for you.

  • User Avatar
    0
    fguo created

    I followed your instruction, and installed yarn via Chocolatey in PowerShell.

    After I run command "ng serve" in the root of Client folder, it shows some green message and last line is "webpack: Compiled successfully".

    I then navigate to <a class="postlink" href="http://localhost:4200/">http://localhost:4200/</a>. It shows a popup with "An error has occurred! Error detail not sent by server". I can click "OK" button to close this popup, but the screen is stuck with an endless spin. :(

    Please advise!

    Thanks,

  • User Avatar
    0
    justinp created

    If the UI project can't find the back-end (API Project), then you'll get the forever spinning. Try to run both projects at the same time.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thanks @JustinP :), exactly you need to run Host project in server solution as well.