如何在Angular项目中使用锚点组件实现水平放置?

新手上路,请多包涵

项目中使用锚点组件,像实现锚点文字水平放置为什么报错呢?<nz-anchor [nzDirection]="'horizontal'">

nzDirection设置为horizontal 启动项目,项目报错:
提示如下:Can't bind to 'nzDirection' since it isn't a known property of 'nz-anchor'.

  1. If 'nz-anchor' is an Angular component and it has 'nzDirection' input, then verify that it is included in the '@Component.imports' of this component.
  2. If 'nz-anchor' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@Component.schemas' of this component.
阅读 693
1 个回答
  1. 确认 nz-anchor 组件是否已经导入
  2. 确认当前版本的 nz-anchor 是否支持 nzDirection
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进