2016-07-29 57 views
1

我試圖轉移在angularjs進入了一個文本框到另一個值的價值,這是我的嘗試,但它不工作轉移在文本框輸入到另一個angularJs

<label>Email Address:</label> 
     <input type="email" name="userEmail" ng-model="email" required /> 

      <span class="invalid" ng-show="myForm.userEmail.$error.required">Your email is required</span> 
     <br> 

     <input type="email" name="emailAccess" ng-model="{{email}}" required /> 

請幫助!

回答

3
<label>Email Address:</label> 
     <input type="email" name="userEmail" ng-model="email" required /> 

      <span class="invalid" ng-show="myForm.userEmail.$error.required">Your email is required</span> 
     <br> 

     <input type="email" name="emailAccess" ng-model="email" required /> 

從最後一個刪除{{和}}。

+1

謝謝,我會盡快接受你的回答 –

+0

快樂是我的 – Tuhin

0

對於雙向傳輸,請使用不帶括號的ng模型。

<input type="email" name="userEmail" ng-model="email" required /> 
<input type="email" name="emailAccess" ng-model="email" required /> 
相關問題