Skip to content

Commit 3d1f809

Browse files
committedAug 5, 2021
ocr : event binding
1 parent b487f72 commit 3d1f809

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎src/app/app.component.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ <h2>Mes appareil</h2>
77
<app-appareil></app-appareil>
88
<app-appareil></app-appareil>
99
</ul>
10-
<button class="btn btn-success" [disabled]="!isAuth">Tout allume</button>
10+
<button class="btn btn-success"
11+
[disabled]="!isAuth"
12+
(click)="onAllumer()">Tout allume</button>
1113
</div>
1214
</div>
1315
</div>

‎src/app/app.component.ts

+4
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ export class AppComponent {
1515
}, 4000
1616
);
1717
}
18+
19+
onAllumer() {
20+
console.log('On allume tout !');
21+
}
1822
}

0 commit comments

Comments
 (0)
Please sign in to comment.