我使用amp-bind绑定类属性:
<div [class]="menu.menuClass" class=hide">...</div>使用以下amp-state元素:
<amp-state id="menu">
<script type="application/json">
{"menuClass":"hide"}
</script>
</amp-state>但是,在加载页面之后,我得到了错误:
amp-bind: Default value for [class] does not match first expression result (hide). This can result in unexpected behavior after the next state change.​​​(此错误被隐藏在div本身中)
如您所见,我的默认值确实与第一个表达式匹配。我做错了什么?
https://stackoverflow.com/questions/43331218
复制相似问题