Reputation: 123
I am new on Angular and trying to use it on Asp Net Core project. However; I could not find a good template to start with. Also, I could not put Angular 4 templates into existing ASP Net Core & Angular templatepack . File structures made me crazy! Asp Net Zero is a good starter kit but I cannot afford it. I have made a good research on google, but I could not get a good answer. Is there any other templates or starter kits, obviously, less professional to take me start to code in Angular with Asp Net Core? Thanks for answers!
Upvotes: 0
Views: 638
Reputation: 303
I tried the answer of @john-mccann, but this generator is deprecated, here the message:
$ yo aspnetcore-spa
## Please use "dotnet new" templates instead
As of .NET Core 2.0, it's no longer necessary to use Yeoman to create new
Single-Page Application projects.
Using the .NET Core 2.0 SDK, you can run any of the following commands in an empty directory, without needing to install any external packages first:
* dotnet new angular
* dotnet new react
* dotnet new redux
Or, if you want to create an Aurelia, Knockout, or Vue application, you should run dotnet new --install Microsoft.AspNetCore.SpaTemplates::* first. This will add aurelia, knockout, and vue templates to dotnet new.
### This Yeoman generator is DEPRECATED
Please don't use generator-aspnetcore-spa to create new projects. Its output is outdated and no longer maintained. Instead, use dotnet new as described above (or if you're on Windows and use Visual Studio, you can just use File->New Project to create Angular, React, or React+Redux projects).
After, I tried this
$dotnet new angular
And works fine with this
$ dotnet new angular
$ dotnet restore
$ npm install
Upvotes: 2
Reputation: 597
I have found the Yeoman ASP.NET Core Single-Page App generator (generator-aspnetcore-spa) to be a good starting point.
npm install npm@latest -g
npm install -g yo
npm install -g yo generator-aspnetcore-spa
yo aspnetcore-spa
Telerik has a nice howto: http://www.telerik.com/blogs/cooking-with-aspnet-core-and-angular-2
*The above howto says Angular 2, however the generator is updated to 4.
Upvotes: 2