<分区>
我不知道哪里做错了,因为没有错误报告。
我有一个组件类
import { Component, OnInit, ViewContainerRef } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
testhtml = "<p>Hello world</p>";
constructor(){}
}
}
在我的模板文件中,我做了这样的事情:
<div class="blog-post">[innerHtml]="testhtml"</div>
但这似乎行不通。我还需要导入其他东西吗?
我正在使用 angular-cli "version": "1.0.0-beta.26",