【问题标题】:Angular 5 can't load childComponentsAngular 5 无法加载子组件
【发布时间】:2018-08-12 20:07:57
【问题描述】:

我正在尝试加载内部组件:

app/stores/store/store-top.component

一旦用户单击列表中的任何商店,我希望在商店组件中显示商店顶部的内容。

请提供一些意见

下面是我的仓库:https://github.com/kamleshkatpara/ngModuleIssue.git

【问题讨论】:

  • 请在您的问题中为您的代码提供链接,以供将来查看此问题的人使用。 Stackblitz、plnkr 等链接可能会及时消失。
  • @Bunyamin Coskuner 希望它能与 GIt repo 一起使用
  • 您最好提供一个 git repo,以便人们可以克隆到其中并重现问题。但是,您应该将您认为不起作用的代码放在您的问题中,以便人们可以立即看到问题出在哪里。
  • @Bunyamin Coskuner,这会很困难,因为有很多文件。我只需要显示来自父级的 childComponent

标签: angular angular5 angular-routing angular-components


【解决方案1】:

@Bunyamin Coskuner

我解决了这个问题,我没有在我的模块中正确加载组件,现在它正在工作

这里是演示链接:https://github.com/kamleshkatpara/work.git

【讨论】:

    猜你喜欢
    • 2018-08-12
    • 2020-08-10
    • 2019-02-06
    • 2018-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-06
    • 2018-11-17
    相关资源
    最近更新 更多