Prev Demo
AngularJS
>
Two Way Data Binding
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> <script> var app = angular.module('app', []); app.controller('myController', function($scope) { $scope.FullName = "Change Full Name here"; $scope.Address = "Change Address here"; }); </script> </head> <body> <h3>Two way data binding - AngularJS</h3> <div ng-app="app" ng-controller="myController"> <p>Change values of textbox</p> <p> Full Name: <input type="text" ng-model="FullName" /> <br /> <br /> Address: <input type="Text" ng-model="Address" /> </p> <hr /> <p> Full Name: <span style="background-color:yellow;">{{FullName}}</span><br/> Address: <span style="background-color:yellow;" ng-bind="Address"></span> </p> </div> </body> </html>
Note: We DO NOT save your trial code in our database.
Output