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)
-
0
Hi,
I have replied your other post. For this one, follow below steps to run angular project with angular-cli
- First install yarn here <a class="postlink" href="https://yarnpkg.com/">https://yarnpkg.com/</a>
- Open a command promt and navigate to root of Client folder.
- run "yarn install" command (remove node_module folders if it already exists)
- then run "npm start" command to start your angular application.
Please let us know if it does not work for you.
-
0
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,
-
0
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.
-
0
Hi,
Thanks @JustinP :), exactly you need to run Host project in server solution as well.