Anupam Mishra Total Post:135 Points:949 Posted by Anupam Mishra March-03-2016 23:19 PM JavaScript Angular JS CSS Angular JS 1 Reply(s) 751 View(s) Ratings: Rate this: Hi all,I have one textbox and i want to enter a username in the Live Preview text box; the text below the text box changes instantly. Please give me a solution.Thank you.
Sachin Singh Post:26 Points:182 Re: How to bind text box to the the text Posted on 2 years ago Hi Anupam,If We want to bind with text box in angular js then be use ng-bind directives.Here, below we are using such bind in the program: <script> angular.module('binduserName', []) .controller('myController', ['$scope', function ($scope) { $scope.username =username; }]);</script><div ng-controller="myController"> <label>Enter User name: <input type="text" ng-model="username"></label><br> Hello <span ng-bind="username"> </span>!</div> Output:Here ,when we changed with another text ,it will display that text in the below of textbox.
Post:26
Points:182Re: How to bind text box to the the text
Hi Anupam,
Output: