【问题标题】:Ionic 2 & Angular 2 - Two Components in another oneIonic 2 & Angular 2 - 两个组件合二为一
【发布时间】:2017-04-09 00:42:54
【问题描述】:

我正在将 ionic2 用于移动应用程序。 现在我想在桌面浏览器中使用该应用程序,但设计并不出色。

我想在一页上显示两个组件。可能吗 ? 例如,通过在另一个 @Component 中包含两个 @Component ?

谢谢

【问题讨论】:

    标签: angular web ionic2


    【解决方案1】:

    你的父组件 HTML 应该是 ...

    <component1></component1>
    <component2></component2>
    

    【讨论】:

    • 基于组件中selector 的值。而且您必须在declarationsentryComponents 下的@NgModule 中声明它们,甚至不需要在您的父页面上导入它们
    猜你喜欢
    • 2016-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-07
    • 1970-01-01
    • 2016-11-20
    • 2017-02-08
    • 1970-01-01
    相关资源
    最近更新 更多