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
  • 67,510
  • 23
  • 129
  • 159
cool breeze
  • 4,131
  • 5
  • 34
  • 60

0 Answers0