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="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body ng-app="myapp">
<div ng-controller="mycontroller">
<h1></h1>
</div>
<script src="Scripts/angular.js"></script>
<script>
var app = angular.module("myapp", []);
app.controller("mycontroller", fnController);
function fnController($scope) {
$scope.message = "Hello From Angularjs App";
};
</script>
</body>
</html>
index.html
file should look like :
Run the application
First angular js application