Search This Blog

Thursday, 17 August 2017

02 - .net core minimal ASP.Net core - Angular 4 ,WebPack 2, JIT and AOT

Hi guys,

So continuing our project we are going start  with modification project to run as static files and then start the configuration for webpack and introduction for Angular 4 .

It is necessary to do only few modifications to be able to run ASP .net core project using static pages.

 Add reference for the library to use static files at the project .csproj .

<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />

and then modify Configure method in startup.cs allow the run time to use StaticFiles also to the webserver identify the standard default file.

Thursday, 13 July 2017

01- .net core minimal ASP.Net core - Angular 4 ,WebPack 2, JIT and AOT

Hello , Everybody

We are going enjoy together  a new way to developer using .net core without MVC , the idea is do not add some many features which we will not use also I will startup one first page in angular 4 and show the differences between JIT and AOT angular cli compiler.

So lets start.

Check if you have the latest SDK dotnet installed in your machine.

Open your prompt or terminal and do the command

Command to check the dotnet version
 dotnet --version 

I'm using 1.0.1

Command to create a folder
 mkdir  aarvanilabAngular4 
Command to go the folder
 cd arvanilabAngular4 
Command to create a new project using a blank web project
 dotnet new web
Command to get the libraries in nuget or npm
 dotnet restore 
Command to run the project 
 dotnet run 

Doing this we could be able to navigate in our new page in the navigator http://localhost:5000 , our hello world page.

Once we have the blank project created in the folder, we could start open our project in VS code or another code editor.

Saturday, 25 March 2017

ASP WebApi Core and Angular 2

Hi ,

We will enjoy together to start a new project using .Net Core Web Api and Angular 2 , new challenge and a new world for ones whose have never had any contact with open source technologies or one different environment.

So lets pratique.


NodeJS (NPM)

. Net Core

Yeoman (via command line in your terminal or prompt)
npm install -g you

In my lab I am using Visual Studio Code , but you could use any IDE or prompt you prefer.

Start kit Angular 

Basically for this test proposal we are going to use the template base just to initial test and then I going to use one simple project to demonstrate the powerful feature it is Angular 2.

Install the scaffold to generate asp net core via terminal
 npm install -g yo generator-aspnetcore-spa 

go to the folder which you want save the files ou create a new one and then command to start the scaffold.
 yo aspnetcore-spa 

and finally

  dotnet restore   

  npm install    

  dotnet run  

Use the navigator to browse http://localhost:5000

Should show the default angular start kit.


One of many problems which I have during my experience using Angular it was extremely difficult find one template stable enough to start to work and runnable in different OS, I am using these in my projects it working quite well.

See you next post.