I have 4+ experience and working as software Engineer with Hytech professionals India PVT ltd and also working as Consultant,Trainer,Blogger and Author on Microsoft technologies,Also I have Trained more than 500+ IT professionals.I have knowledge about Asp.net,C#,SQL,Project management,replication,MVC,WebApi,SSRS,PostMan,TFS,SVN,Swagger,WMI,Agile,SignalR,Angularjs,IIS configuration.

Part 2::Two Way data Binding In AngularJs

Basic Example of Two way data binding :-
Step 1:-Create simple HTML page.
Step 2:-Include AngularJs library  to support Angularjs in your application inside head tag with script tag.
or /use CDN URL:-<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
Step 3:-Run your html page.
<!DOCTYPE html>
<html>
<head>
<script src="angular.js"></script>
</head>
<body ng-app ng-init="firstName = 'Bikesh'; lastName = 'Srivastava';">
<strong>First name:</strong> {{firstName}}<br />
<strong>Last name:</strong> <span ng-bind="lastName"></span><br />
<br />
<label>Set the first name: <input type="text" ng-model="firstName"/></label><br />
<label>Set the last name: <input type="text" ng-model="lastName"/></label>
</body>
</html>
Description:-
We have a two way information tying when a model variable is bound to a HTML component that can both change and show the estimation of the variable. When all is said in done, we could have more than one HTML component bound to the same variable. 
We utilize the ng-model order to tie a model variable to the HTML component that can show its quality, as well as change it.
In the sample, we tie the firstName and lastName model variables to several HTML info components. At the point when the page is stacked, the estimation of the data components are instated to those of the individual model variables and at whatever point the client sorts something in an info, the estimation of the model variable is altered also (two way).
You have just read an article that categorized by title AngularJs by title Part 2::Two Way data Binding In AngularJs. You can bookmark this page with a URL https://bikeshsrivastava.blogspot.com/2016/01/two-way-binding-in-angularjs.html. Thank You!
Author: Bikesh Srivastava - Saturday, 16 January 2016

There are currently no comments for "Part 2::Two Way data Binding In AngularJs"

Post a Comment

Life Is Complicated, But Now programmer Can Keep It Simple.