按照示例从http://valor-software.com/ng2-bootstrap/使用 ng2-bootstrap 生成选项卡视图,我有以下代码:
<tabset>
<tab *ngFor="#tabz of tabs"
[heading]="tabz.title"
[active]="tabz.active"
(select)="tabz.active = true"
(deselect)="tabz.active = false"
[disabled]="tabz.disabled"
[removable]="tabz.removable"
(removed)="removeTabHandler(tabz)">
{{tabz?.content}}
</tab>
但我想从 {{tabz?.content}} 属性中提取 HTML 代码。有没有办法做到这一点?我的标签数组如下所示:
public tabs:Array<any> = [
{title: 'Summary View', content: 'Dynamic content 1', active: true},
{title: 'Search View', content: '<someAngularComponent>Error Displaying Entry view</someAngularComponent >'}];