mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 13:01:01 +08:00
32 lines
534 B
TypeScript
32 lines
534 B
TypeScript
import {App} from 'ionic-angular';
|
|
|
|
|
|
@App({
|
|
templateUrl: 'main.html'
|
|
})
|
|
class E2EApp {
|
|
constructor() {
|
|
this.homeIcon = 'home';
|
|
this.isActive = false;
|
|
|
|
this.iconIndex = 0;
|
|
this.icons = [
|
|
'home',
|
|
'star',
|
|
'ios-alert',
|
|
'ios-alert-outline',
|
|
'md-alert',
|
|
'logo-apple'
|
|
];
|
|
this.btnIcon = this.icons[0];
|
|
}
|
|
|
|
updateIcon() {
|
|
this.iconIndex++;
|
|
if (this.iconIndex >= this.icons.length) {
|
|
this.iconIndex = 0;
|
|
}
|
|
this.btnIcon = this.icons[this.iconIndex];
|
|
}
|
|
}
|