简体   繁体   中英

How to randomize data in ng-repeat in firebase

So I had some idea in mind, I want to create firebase data about quotes look like this

quotes:{
    ObjectId:{
         title: "When there's a will there's a way"
       },
    ObjectId:{
         title: "When there's a will there's a way"
       }
}

What I want to do is, I want to show it but randomly fading. If we use ng-repeat it would likely to show all of them. Any suggestion for what library should I use ? thank you so much for your help.

You could use a 2ed array. Fill the 2ed array with random values of the 1st array, and use bind your page/ng-repeat on the 2ed array :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM