Have you created a angular app with .net core in Visual studio 2017 ?
Today i am going to show you fast and easy way to create angular application.
Before that I will tell you something about Angular & .Net Core
For more Detail of .Net Core follow below links.
As we know the basic topics know lets start with what we need to build this application
As .Net Core application can be developed on Windows,macOS & Linux .I will focus on Windows .
Now, Lets start making web app in Visual Studio
Open Visual Studio File->New Project , Then Select .Net Core & Asp.net Core Web Application ,Name your project.
Now you will select Angular
Open Dependencies=> npm here you can see angular files.
The project structure is well known like Controller, Views and wwwroot folder.
The ClientApp folder contains the angular app ,it will be used as views in the project & Views in the folder will be used for minimum purpose only for bootstrap feature,All other will be done by ClientApp
Press Ctrl+F5 your web page will open with http://localhost:xxxxx / url in the browser.
Hello world page opened Its your Single-page application. On left side you can see the navigation.
Lets go to the Counter link you will see Increment Button & current count is Zero.
Clicking on increment it will increase by 1 till you click that button.
This increment is happening in typescript function incrementCounter() .
Now lets do some changes in typescript file we will change
You have to this when project is in running state only. The Counter on the page will get reset to Zero on the fly. It will get changed automatically this is magical thing about angular you changes will reflect immediately.
Lets experiment something more we go to Fetch Data You can see Weather forecast
We will change it while project is running we go to fetch data folder in that you have fetchdata.component.html
<h1>Weather forecast 2</h1>
You can see the changes gets reflected when you save it on your Visual Studio.
The is magical thing about angularjs.
I will be happy to hear from you if you find any other magic for One page angular application in .net core .Please Comment.