I'm currently going through a https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2017-Launch/WEB-103
on setting up Spa apps with Visual Studio on Mac (macOS Sierra, Visual Studio Community 2017).
I've successfully installed angular core, and am currently trying to create a new project based off of one of the installed templates.
I can see two angular templates when I run sudo dotnet new -l
:
MVC ASP.NET Core with Angular angular [C#] Web/MVC/SPA
ASP.NET Core with Angular angular [C#] Web/MVC/SPA
When running sudo dotnet new angular
, I keep getting the following error:
Unable to determine the desired template from the input template name: angular.
The following templates partially match the input. Be more specific with the template name and/or language.
Templates Short Name Language Tags
----------------------------------------------------------------------------
MVC ASP.NET Core with Angular angular [C#] Web/MVC/SPA
ASP.NET Core with Angular angular [C#] Web/MVC/SPA
Examples:
dotnet new angular
dotnet new angular
dotnet new --help
Is there something in the command I'm missing? Is something with Visual Studio / dotnet configured incorrectly?
Now open Visual Studio Code. Go to "File" > "Open Folder" and select "First-Angular-Project" from the "Desktop". Now in the "TERMINAL" run ng new Angular-Project-Demo. Whenever it prompts with something like "Would you like to add Angular routing? (y/N)" press "y" and hit "ENTER".
Using Angular in Visual Studio Code. Angular is a popular web development platform developed by Google. The Visual Studio Code editor supports Angular IntelliSense and code navigation out of the box.
To install the Single Page Application (SPA) templates, run the following command:
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
Now create any SPA ...
dotnet new angular -o ngApp
cd .\ngApp\
npm install
dotnet restore
dotnet run
With .netcore 2.1
dotnet new angular -o my-new-app
cd my-new-app
Now on 2.1 the package.json is inside client app
cd ClientApp
npm install
dotnet restore
dotnet run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With