Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amp html 扩展';amp-bind';在此页上找到,但未使用。请删除此分机。”;_Amp Html_Google Amp - Fatal编程技术网

Amp html 扩展';amp-bind';在此页上找到,但未使用。请删除此分机。”;

Amp html 扩展';amp-bind';在此页上找到,但未使用。请删除此分机。”;,amp-html,google-amp,Amp Html,Google Amp,我有一个非常简单的AMP页面,它使用AMP-bind。但是,验证程序始终显示以下消息: 在此页上找到扩展名“amp bind”,但未使用。请 请删除此扩展。” 我的页面使用了amp bind。页面代码如下: <!doctype html> <html ⚡> <head> <meta charset="utf-8"> <script async src="https://cdn.ampproject.org/v0.js"&g

我有一个非常简单的AMP页面,它使用
AMP-bind
。但是,验证程序始终显示以下消息:

在此页上找到扩展名“amp bind”,但未使用。请 请删除此扩展。”

我的页面使用了
amp bind
。页面代码如下:

<!doctype html>
<html ⚡>
  <head>
    <meta charset="utf-8">
    <script async src="https://cdn.ampproject.org/v0.js"></script>
    <link rel="canonical" href="http://localhost/amp-bind.html" />
    <title>AMP bind test</title>
    <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
    <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
    <script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>
  </head>
  <body class="main">
    <h3>amp-bind example</h3>
    <p [text]="'Hello '+username">Hello World</p>
    <button on="tap:AMP.setState({username: 'rodders'})">Say Hello</button>
  </body>
</html>

安培结合试验
body{-webkit动画:-amp start 8s steps(1,end)0s1 normal tweet;-moz动画:-amp start 8s steps(1,end)0s1 normal tweet;-ms动画:-amp start 8s steps(1,end)0s1 normal tweet}@-webkit关键帧-amp start{从{可见性:隐藏}到{可见性:可见}}@-moz关键帧-amp start{from{可见性:隐藏}
放大器绑定示例
你好世界

打招呼

有人能解释为什么会显示此消息,以及我可以如何删除它吗?

这是一个曾经存在的错误。解决方法是在页面上包含
元素。很抱歉!

您如何解释这行代码:
这是AMP文档的直接内容,是如何包含
AMP bind
组件:有您可以将许多自定义元素放在文档中;但如果您不使用它们,验证程序将警告您。我看不出您在哪里使用
bind
-可能您没有将其包含在示例中。当然,但此页面所做的唯一事情就是使用
amp bind
。如果您看不到它在哪里使用,请检查文档!
Hello World

Say Hello
这两行都使用了
amp bind
Hi,由于未设置username变量的默认值,因此此页面上出现了不同的错误。要解决此问题,最好的方法是使用amp state标记指定默认值。