属性 'content' 绑定到标签 'InputItem'失败

新手上路,请多包涵

我用到了InputItem标签, 然后用到该标签自带的属性content, 也是按照原文档写的代码:

<div class="am-list" style="margin:0;">

    <div class="am-list-header">Custom title(text / image / empty)</div>
    <div class="am-list-body">
        <InputItem [placeholder]="'no label'"></InputItem>
        <InputItem [placeholder]="'title can be icon,image or text'" [content]="content">
            <ng-template #content>
                <div
                        style="background-image:url(https://zos.alipayobjects.com/rmsportal/DfkJHaJGgMghpXdqNaKF.png); background-size:cover;height:22px; width: 22px "
                ></div>
            </ng-template>
        </InputItem>
    </div>
</div>

但是报错:  Can't bind to 'content' since it isn't a known property of 'InputItem' ,这是为什么呢### 问题描述

问题出现的环境背景及自己尝试过哪些方法

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)

你期待的结果是什么?实际看到的错误信息又是什么?

阅读 896
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题