mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(): dynamically update icon test
This commit is contained in:
@@ -8,5 +8,10 @@ class E2EApp {
|
||||
constructor() {
|
||||
this.homeIcon = 'home';
|
||||
this.isActive = false;
|
||||
this.btnIcon = 'home';
|
||||
}
|
||||
|
||||
updateIcon() {
|
||||
this.btnIcon = (this.btnIcon === 'home' ? 'star' : 'home');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,13 @@
|
||||
|
||||
</ion-list>
|
||||
|
||||
<p>
|
||||
<button (click)="updateIcon()">
|
||||
<ion-icon [name]="btnIcon"></ion-icon>
|
||||
Update icon
|
||||
</button>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user