0

I'm currently displaying the selected user on my page like this:

<div ng-repeat="u in vm.Users | filter:{UserId:vm.UserId} | limitTo : 1 ">    
    <span class="form-review">{{u.Name}}</span>
</div>

For some reason it is displaying the wrong user, and I can't figure out why. The UserId is 7, and the value in vm.Users with UserId 7 is e.g. John but it is not displaying the correct name.

Is there another way I can find the user and display the user without using ng-repeat and filter?

I'm using angular 1.x

AT82
  • 71,416
  • 24
  • 140
  • 167
cool breeze
  • 4,461
  • 5
  • 38
  • 67

0 Answers0