---
title: "How to bind text box to the the text"  
description: "How to bind text box to the the text"  
author: "Anupam Mishra"  
published: 2016-03-03  
updated: 2016-03-03  
canonical: https://www.mindstick.com/forum/34029/how-to-bind-text-box-to-the-the-text  
category: "angular js"  
tags: ["javascript", "angular js", "css"]  
reading_time: 1 minute  

---

# How to bind text box to the the text

Hi all,\
I have one [textbox](https://www.mindstick.com/forum/12714/dynamic-textbox-in-gridview) and i want to enter a [username](https://www.mindstick.com/forum/12798/there-is-no-viewdata-item-of-type-ienumerable-selectlistitem-that-has-the-key-username) in the Live [Preview](https://www.mindstick.com/forum/429/i-want-to-get-full-path-of-lt-asp-fileupload-gt-and-then-client-can-click-the-preview-button-to-see-what-file-he-here-has-uploaded) [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) box; the text below the text box changes instantly. Please give me a solution.\
Thank you.

## Replies

### Reply by Sachin Singh

## 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:

![How to bind text box to the the text](https://www.mindstick.com/mindstickforums/4ca6494b-67d5-40f2-a7c3-d13b4e18a913/images/c077f6f7-fbc7-4078-bea6-57884d9fb6ff.png)\
\
***Here ,when we changed with another text ,it will display that text in the below of textbox.***


---

Original Source: https://www.mindstick.com/forum/34029/how-to-bind-text-box-to-the-the-text

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
