当使用amp-bind时,我收到以下错误:
Default value for <input [disabled]="ampState.success"> does not match
first result (). We recommend writing expressions with matching
default values, but this can be safely ignored if intentional.我最初的立场是:
<amp-state id="ampState">
<script type="application/json">
{
// ...
"success": "",
}
</script>
</amp-state>令人反感的因素是:
<input type="submit" <!-- .... --> [disabled]="ampState.success" />如果[disabled]没有实际禁用输入,我就不能为它提供一个默认值吗?
发布于 2018-02-21 20:02:17
我发现可以通过如下设置状态来避免此警告:
<amp-state id="ampState">
<script type="application/json">
{
// ...
"success": "",
}
</script>
</amp-state>在AMP验证器查找禁用属性的actualValue === expectedValue时,初始actualValue实际上是false,而不是''
https://stackoverflow.com/questions/48914179
复制相似问题