.NET Angular

AngularJS, Bootstrap and ASP.NET MVC – Part 1

In this tutorial series, we are going to learn AngularJS as a server side, Bootstrap for layout styling and ASP.NET MVC as server side.

Installation and Project Set-Up

Step 1:

We are using Visual Studio for this tutorial series, you can use any editor as you wish.

Open Visual Studio, Create new project. Select ASP.NET Web Application under Web (Visual C#). Name it “DemoForms” and click OK.

C:\Users\ITH-143\AppData\Local\Microsoft\Windows\INetCache\Content.Word\1.jpg

Select Empty template for now.

C:\Users\ITH-143\AppData\Local\Microsoft\Windows\INetCache\Content.Word\2.jpg

Empty project is now set up. Here’s what you will see in Solution Explorer.

C:\Users\ITH-143\AppData\Local\Microsoft\Windows\INetCache\Content.Word\3.jpg

Step 2:

Now we are going to install all the required packages and libraries. Right click on the project form Solution explorer and select Manage Nuget Packages.

C:\Users\ITH-143\AppData\Local\Microsoft\Windows\INetCache\Content.Word\4.png

Search for AngularJS and install it. Similarly install bootstrap.

C:\Users\ITH-143\AppData\Local\Microsoft\Windows\INetCache\Content.Word\5.jpg
C:\Users\ITH-143\AppData\Local\Microsoft\Windows\INetCache\Content.Word\6.jpg

Step 3:

Now we are done with setup. Let’s add a html page. Right click and Add > Html Page. Name it index.html

C:\Users\ITH-143\AppData\Local\Microsoft\Windows\INetCache\Content.Word\7.png
C:\Users\ITH-143\AppData\Local\Microsoft\Windows\INetCache\Content.Word\8.jpg

Step 4:

Next include bootstrap and angularjs files in the html page. Also add a paragraph tag with Hello world as:

C:\Users\ITH-143\AppData\Local\Microsoft\Windows\INetCache\Content.Word\9.jpg

Step5:

Now run the application. Press F5 to run in browser. Output will be as follows:

C:\Users\ITH-143\AppData\Local\Microsoft\Windows\INetCache\Content.Word\10.jpg

We are done with project set up and installation of libraries. In the next part of this series, we are going to learn the basics of angularjs and start developing in deep.

Thanks.

Happy Coding!

Leave a Reply

Your email address will not be published. Required fields are marked *