组件中的角度2组件

时间:2017-06-14 08:15:50

标签: angular angular2-components

我想在组件中使用组件。 例如;

首先,我将创建一个通用的ModalComponent组件 enter image description here

我想将此组件与我的其他组件一起使用。 例如; enter image description here

1 个答案:

答案 0 :(得分:1)

<ng-content></ng-content>指令解决了我的问题。

<div class="modal-body">
   <ng-content></ng-content>
</div>
相关问题