0

I'm currently storing users 'uid' into an array in my firebase of all my users that are currently active & online.

I want to pull in there account details and currently using functions from my controller to do separate tasks to pull in each part of there profile.

Currently:

    <span ng-repeat="liveUser in vm.liveUsers">
            <button type="button" class="btn btn-default active"><b>#{{vm.getUserNumber(liveUser.uid)}}</b> | @{{vm.getUsername(liveUser.uid)}}</button>
    </span> 

Where 'vm.liveusers' is an firebaseArray of uid's. Then to show the correct details i then am using functions.

I'm curious if this is standard practice or can i somehow use firebase forEach to use the uid to pull in entire profile for each user, then iterate over the data.

The way i'm currently doing it seems kind of clunky, Even if there is a better way to use ng-repeat?

Thanks peeps

22Ryann
  • 137
  • 1
  • 11

0 Answers0