In this blog, let see the basics of Angular Js with simple demo
What is Angular JS?
AngularJS extends HTML with new attributes.
AngularJS is perfect for Single Page Applications (SPAs).
From this blog,you will learn the basics of AngularJS: directives, expressions, filters, modules, and controllers.
Open the visual studio and create simple MVC application and save it in your work space.
Open any CSHTML page and initiate the angular js api link as shown below
then past below code in the body section,
<p>Input something in the input box:</p>
<p>Name : <input type="text" ng-model="name"></p>
From above reference code, we can see ng-model is instantiated in the text box with a name name, as show below,
<input type="text" ng-model="name"></p>
The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.
Now when we bind this ng-model to h1 as shown below,
Then what ever we key in the text box, that will replicate on header h1, as shown below
Thanks for reading my blog, Please do share and like my article if you really liked it :)