Aliasing input/output properties

angular @input alias别名的使用。

https://angular.io/guide/template-syntax#aliasing-io

https://stackoverflow.com/questions/44033676/angular-bind-to-an-input-alias?rq=1

typescript 语法检查会报错,再tslint.json里面加入一句话就可以了。

You can either turn off rule in tslint.json

"no-input-rename": false

or disable checking for only specific line like:

// tslint:disable-next-line:no-input-rename
@Input('appAvatarColor') name: string;

猜你喜欢

转载自www.cnblogs.com/oxspirt/p/10109494.html
今日推荐