我试图填补AMP状态的数据从API,为AMP电子邮件。我们需要从API中提供数据,因为在此期间它可以动态变化。
根据,状态可以从子<script>元素填充,也可以从包含CORS URL的src属性填充到远程JSON端点,但不能同时填充两者。
实际上,将src添加到amp-state将引发以下验证错误:中的The attribute 'src' may not appear in tag 'amp-state (AMP4EMAIL)'
您可以通过将以下代码复制到操场上来测试它。
<!doctype html>
<html ⚡4emai
在AMP I使用javascript_include_tag 'application'包含所有js文件之前,但是现在在AMP实现之后,它显示了错误:
The tag 'script' is disallowed except in specific forms
放大器支持async属性和script标签中的application/json+ld类型
我有以下错误:Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. Check the render method of 'Screens/Enjoy.js'.
有以下代码:
import React, {Component, Fragment} from 'react';
import ReactDOM from 'react-dom