Here is my launch code in Plunker
- The first problem I want to solve is: I want to randomly show data. For my case, I have two questions. One of them: “Do you like Foo”, the other - “Do you like the bar.” When I reload the page, I want these questions to appear randomly. For example, this time it may seem like “you like Foo”. But when I first load the page, you like the Bar.
I created an arbitrary random filter, as shown below, but this will lead to an error: "I do not see the validation symbol when checking the checkbox"
$scope.random = function () { return 0.5 - Math.random(); }
Even in my line 14 of my plunker, I added <div ng-repeat="item in questions | orderBy: random">
Updated: Based on the comment, I created another post for my other.
source share