英文:
How to load set of question and answer to end user based on the admin action for quiz application
问题
我正在创建一个问答应用程序。管理员可以创建问题,根据一些标准,最终用户可以进行游戏。
> “所以管理员可以开始游戏。管理员启动游戏后,最终用户可以看到。管理员有权点击下一个问题,同时应将其显示给最终用户。”
至于这部分,在使用 Ionic 和 Angular 进行开发时,我不太确定如何实现。正在寻求建议。谢谢
英文:
I am creating a quiz application. Where admin can create the question and based on the some criteria end user can play the game.
> "So admin can start the game.. once started the game by admin end user
> can see it. Admin has the rights to click on the next question and it
> should display to the end user at the same time."
So this part i am not sure how to do this in ionic with angular. Looking for suggestion.
Thanks
答案1
得分: 0
我通过生成某些事件来实现这个功能,例如一旦管理员点击了开始按钮,我将会把问题索引和测验编号一起传递到数据库中。在用户端,我将根据测验编号获取数据,然后显示相同的问题。在我的情况下,我使用了数据库,但你也可以使用消息代理,比如RabbitMQ、Kafka或类似的工具。
英文:
I achieve this functionality using generating some event i.e once the admin hit the start button i will pass the question index to data base along with quiz id. In the user side i will fetch the data based on the quiz id and i will display the same question. In my case i have used database but you can use Message broker like RabbitMq,Kafka or any similar tool.
专注分享java语言的经验与见解,让所有开发者获益!
评论