我有一个非常简单的 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>
谁能解释为什么显示此消息,我该怎么做才能删除它?