Charles Baldo
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.wklyLastNam e" />
</span>
</td>
....
....
....
</tr>
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.
<span ng-show="editedItems[user.
<input class="form-control" type="text" ng-model="user.wklyLastNam
</span>
</td>
....
....
....
</tr>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hi
maha
maha
ASKER