Link to home
Start Free TrialLog in
Avatar of Charles Baldo
Charles BaldoFlag for United States of America

asked on

AngularJS need default value in <input>

I am a newbie to AngularJS and JavaScript

I have two <span> tags that toggle on show and hide.  When the toggle goes to show for the input I need the value in {{ user.LastName }} to be the default value in the input.  I tried <input value='{{ user.LastName }}' .....> with no success

 <tr ng-repeat="user in weeklyReportUsers">
....
....
....
<td class="weeklyLastName">
      <span ng-hide="editedItems[user.LastName]">{{ user.LastName }}</span>
      <span ng-show="editedItems[user.LastName]">
            <input class="form-control" type="text" ng-model="user.wklyLastName" />
      </span>
</td>        
....
....
....
</tr>
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Charles Baldo

ASKER

Thanks a ton
Avatar of maga lakshmi
maga lakshmi

hi
          maha