Hi, I'm MalekBenz. I author this blog, I'm FullStack Developer, create courses & love learning, writing, teaching technology. ( Javascript, C#, ASP.NET , NodeJS, SQL Server )

First Angularjs application with Visual Studio

AngularJS JavaScript-based front-end web application framework, it alows you to easily build single-page web applications (SPA).

AngularJS provide a framework for client-side model–view–controller (MVC) and model–view–viewmodel (MVVM) architectures, along with components commonly used in rich Internet applications. You can download Visual studio community.

Create a web application

With Visual Studio New Project:


Name your project and click Ok.


Select Empty project template and click Ok.


Add the following code inside your body tag.

    <h1> index.html </h1>


Run a project :


What about AngularJS

To install AngularJs you can download from the official web site. OR Right click on a project click Manage nuGet package.


Search for angularjs and click install.


Now add you angular.js script to you index.html

    <script src="Scripts/angular.js"></script>

index.html :

        <!DOCTYPE html>
        <html xmlns="">
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <body ng-app="myapp">
                <div ng-controller="mycontroller">

                <script src="Scripts/angular.js"></script>
                    var app = angular.module("myapp", []);
                    app.controller("mycontroller", fnController);
                    function fnController($scope) {
                        $scope.message = "Hello From Angularjs App";

index.html file should look like :

vs code

Run the application

vs code

First angular js application