Articles → ANGULAR.JS → Introduction to angular.js
Introduction to angular.js
Single page application
What is Angular.js?
Software requirement
There are 2 ways to include angular.js on your webpage.
Click to Enlarge
Click to Enlarge
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
Directives
Create your first angular.js application
<div ng-app="">
<p>
Name:
<input type="text" ng-model="name"></p>
<p ng-bind="name">
</p>
</div>
<%@ Page Language=”C#” AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div ng-app="">
<p>
Name:
<input type="text" ng-model="name"></p>
<p ng-bind="name">
</p>
</div>
</form>
</body>
</html>
Output
Click to Enlarge
How it works
Click to Enlarge