【发布时间】:2018-05-26 14:32:37
【问题描述】:
应用组件
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
application: Application = new Application();
pageTitle: string;
constructor() {
this.pageTitle = "{{application.businessName}} has been Approved";
this.application.businessName = 'Test';
}
}
AppComponent Html
<h1>{{pageTitle}}</h1>
我需要的结果
测试已获批准
【问题讨论】:
-
Application是什么类?在您将Test分配给它之前,businessName是什么? -
对于这个示例应用程序类有一个名为 businessname 的属性
-
您没有发布足够的信息,例如:您的组件装饰器详细信息在哪里?你得到的实际结果是什么?请编辑您的问题
-
更新了问题
-
您的查询是什么?
标签: angular angular2-template angular2-forms