[英]How to declare Inputs on a component in Angular 2 in ES5?
Angular2的当前文档没有提供在es5语法中使用@Input
和@Output
的示例。
我试图让一个有角度的小提琴,所以需要使用es5
这是es2016版本
class BankAccount {
@Input() bankName: string;
@Input('account-id') id: string;
// this property is not bound, and won't be automatically updated by Angular
normalizedBankName: string;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.