Home
Tutorials
Microsoft Technologies Tutorials
Java Programming Tutorials
Web Designing Tutorials
Script Programming Tutorials
Database Programming Tutorials
Mobile Technologies Tutorials
Other Programming Tutorials
Examples
Articles
Tools
News
AngularJS Data Binding Example
Keywords : Angularjs bind data to input controls example, Angularjs data binding with ng-model directive example, Angularjs input field data binding example, Angularjs data binding directive example
Example
<!DOCTYPE html> <html> <head> <title> AngularJs Data Binding to Input Controls Example </title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script type="text/javascript"> var app = angular.module('formApp', []); app.controller('formCtrl', function ($scope) { $scope.fname = "Welcome to "; $scope.lname = "Tutlane.com"; }); </script> </head> <body> <h2>AngularJS Data Binding Example</h2> <div ng-app="formApp" ng-controller="formCtrl"> First Name:<input type="text" ng-model="fname" /><br /><br /> Last Name:<input type="text" ng-model="lname" /> <p>Full Name: {{fname +" "+ lname}}</p> </div> </body> </html>
Click Here to See Result
Result
Previous
Next