我想用角2,使在複選框的事件作出複選框事件:如何使用angular2
<div class="panel-heading panelcolor">
<span style="font-size: 15px;font-weight: bold">Date et horaire</span>
<div class="checkbox checkbox-inline" style="float:right">
<input type="checkbox" data-md-icheck formControlName="ddd" id="inlineCheckbox12" (click)="toto($event)">
<label for="inlineCheckbox12" placement="bottom"> Aller-retour </label>
</div>
</div>
組件:
toto(e){
alert(e);
}
當我點擊複選框它給了我這個錯誤:
itineraire.component.html:98 ERROR TypeError: co.toto is not a function
但代碼correcte哪來的問題? –
你把toto()放在哪裏? – Vega