【问题标题】:Angular clarity design not to lazy load tabs角度清晰设计不会延迟加载标签
【发布时间】:2019-12-17 09:28:00
【问题描述】:

我需要不要延迟加载带有清晰标签组件的标签, 并且能够以编程方式在选项卡之间切换。 问题是,如果我应用提到它的指令,文档 [(clrIfActive)] 内容就会被延迟加载。 这是文档:https://v2.clarity.design/tabs

【问题讨论】:

  • 所以你不想想要延迟加载标签?
  • 请为这个问题添加更多细节 - 包括 @NicholasK 的评论 - 为什么要避免延迟加载?是否有您希望省略它的根本原因,例如传递数据的问题?到目前为止,您尝试过什么?
  • 从您发布的链接The tabs component uses the *clrIfActive structural directive to lazy load the content of an active tab. 离开它应该可以解决您的问题。

标签: javascript angular vmware-clarity clarity


【解决方案1】:

如果您想要延迟加载,请在 clr-tab-content 组件标记中包含 *clrIfActive 指令,例如:

        <clr-tab-content id="content1" *clrIfActive>
        ...
        </clr-tab-content>

如果您不想延迟加载,请将*clrIfActive 排除在外。

【讨论】:

猜你喜欢
  • 2019-08-22
  • 2021-09-21
  • 1970-01-01
  • 2017-12-05
  • 1970-01-01
  • 1970-01-01
  • 2018-05-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多