标签:skill toggle cto pre col select exp cli 绑定
事件绑定语法(可以通过 (事件名)
的语法,实现事件绑定)
<date-picker (dateChanged)="statement()"></date-picker> 等价于: <date-picker on-dateChanged="statement()"></date-picker>
@Component({ selector: ‘sl-user‘, template: ` <button (click)="toggleSkills()"> {{ showSkills ? "隐藏技能" : "显示技能" }} </button> ` }) export class UserComponent { toggleSkills() { this.showSkills = !this.showSkills; } }
标签:skill toggle cto pre col select exp cli 绑定
原文地址:http://www.cnblogs.com/avidya/p/7461323.html