In this article, I’m explaining the basics of angular js.
AngularJS Extends HTML
AngularJS extends HTML with ng-directives.
The ng-app directive defines an AngularJS application.
The ng-model directive binds the value of HTML controls to application data.
The ng-bind directive binds application data to the HTML view.
First create an empty asp.net web application and add a webform to it:
<%@ Page Language='C#' AutoEventWireup='true' CodeBehind='WebForm1.aspx.cs'
<p>Firstname : <input type='text' ng-model='firstname'></p>
AngularJS starts automatically when the web page has loaded.
The ng-app directive tells AngularJS that the <div> element is the 'owner' of an AngularJS application.
The ng-model directive binds the value of the input field to the application variable name.
The ng-bind directive binds the innerHTML of the <p> element to the application variable name.