1

I have two input filed and those are given below.

<input type="text" name="itemname" id="contactno" class="form-control" placeholder="short name" ng-model="dept_short_name" > <input type="text" name="itemname" id="contactno" class="form-control" ng-model="loginname" readonly="readonly" value="{{dept_short_name}}" > 

I need when user will type any text in first input field the second input field will update with same data simultaneously.Please help me.

3 Answers 3

2
<input type="text" ng-model="dept_short_name" /> <input type="text" readonly="readonly" ng-model="dept_short_name"></input> 
Sign up to request clarification or add additional context in comments.

Comments

1

It is simplest one task using angularjs. Check the fiddle link.

LINK: 

FIDDLE

Comments

0

In controller watch dept_short_name and change loginname as you want inside watch.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.