mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
test(icon): app module was being ignored by my global gitignore
This commit is contained in:
55
src/components/icon/test/basic/app.module.ts
Normal file
55
src/components/icon/test/basic/app.module.ts
Normal file
@ -0,0 +1,55 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
export class E2EPage {
|
||||
homeIcon = 'home';
|
||||
isActive = false;
|
||||
iconIndex = 0;
|
||||
icons = [
|
||||
'home',
|
||||
'star',
|
||||
'ios-alert',
|
||||
'ios-alert-outline',
|
||||
'md-alert',
|
||||
'logo-apple'
|
||||
];
|
||||
btnIcon: string;
|
||||
dynamicColor: string = 'danger';
|
||||
|
||||
constructor() {
|
||||
this.btnIcon = this.icons[0];
|
||||
}
|
||||
|
||||
updateIcon() {
|
||||
this.iconIndex++;
|
||||
if (this.iconIndex >= this.icons.length) {
|
||||
this.iconIndex = 0;
|
||||
}
|
||||
this.btnIcon = this.icons[this.iconIndex];
|
||||
}
|
||||
}
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="rootPage"></ion-nav>'
|
||||
})
|
||||
export class E2EApp {
|
||||
rootPage = E2EPage;
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
E2EApp,
|
||||
E2EPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(E2EApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
E2EPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
Reference in New Issue
Block a user