7
当组件被呈现,则内容内部被忽略之间的内容,例如角2:呈现组件标签
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: '<div>{{title}}</div>',
})
export class AppComponent {
title = 'app works!';
}
使用它像
<app-root>Ignored content</app-root>
渲染
<div>app works!</div>
但是看PrimeNg对话框他们使用这样的组件
<p-dialog [(visible)]="display">
<p-header>
Header content here
</p-header>
Content
<p-footer>
Footer content here
</p-footer>
</p-dialog>
由于“标题内容在这里”,“内容”和“页脚内容在这里”是内部组件,为什么不被忽略,我怎么能实现这个?