【问题标题】:Is there a way we can create user interactive content within amp stories?有没有一种方法可以在 amp 故事中创建用户交互内容?
【发布时间】:2019-09-15 13:45:56
【问题描述】:

我正在构建一个放大器故事,我需要将用户输入作为选择。假设有 3 个按钮 Button 1Button 2Button 3。如果用户点击Button 1choice 1 的内容将显示,其他按钮也类似。

我试图为此使用AMP.setState。它适用于普通的 AMP 页面,但是当将 amp 故事添加到页面时,它就不起作用了。

这里是code for the above mentioned experiment

请查看并提出一些合适的解决方案。 谢谢。

【问题讨论】:

    标签: amp-story amp-bind


    【解决方案1】:

    amp-storyamp-bind 不兼容。

    故事有一个正在开发中的实验性功能,称为“分支”,它允许用户通过在同一故事的不同页面之间拆分内容状态来进行交互(请参阅work in progress documentation)。

    在您的示例中,如果用户分别点击了Button 1Button 2Button 3,您需要创建单独的故事页面供用户登陆。

    【讨论】:

      猜你喜欢
      • 2022-11-22
      • 1970-01-01
      • 1970-01-01
      • 2010-09-06
      • 2023-03-23
      • 2012-10-27
      • 1970-01-01
      • 2020-01-08
      • 2021-02-22
      相关资源
      最近更新 更多