@ionic/angular#MenuController TypeScript Examples
The following examples show how to use
@ionic/angular#MenuController.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: appmanager.service.ts From Elastos.Essentials.App with MIT License | 6 votes |
constructor(
private sanitizer: DomSanitizer,
public zone: NgZone,
public theme: GlobalThemeService,
public popoverController: PopoverController,
private modalController: ModalController,
public menuCtrl: MenuController,
private translate: TranslateService,
private events: Events,
private didService: DIDManagerService,
private native: GlobalNativeService,
private storage: GlobalStorageService,
private language: GlobalLanguageService,
private globalIntentService: GlobalIntentService,
private globalNav: GlobalNavService,
// In-app Services
private hiveManagerInitService: HiveManagerInitService,
private dposVotingInitService: DPoSVotingInitService,
private walletInitService: WalletInitService,
private crCouncilVotingInitService: CRCouncilVotingInitService,
private contactsInitService: ContactsInitService,
private walletNetworkService: WalletNetworkService
) { }
Example #2
Source File: app.component.ts From fyle-mobile-app with MIT License | 6 votes |
constructor(
private platform: Platform,
private router: Router,
private authService: AuthService,
private userEventService: UserEventService,
private menuController: MenuController,
private deviceService: DeviceService,
private appVersionService: AppVersionService,
private routerAuthService: RouterAuthService,
private networkService: NetworkService,
private freshChatService: FreshChatService,
private zone: NgZone,
private deepLinkService: DeepLinkService,
private pushNotificationService: PushNotificationService,
private trackingService: TrackingService,
private loginInfoService: LoginInfoService,
private navController: NavController,
private popoverController: PopoverController
) {
this.initializeApp();
this.registerBackButtonAction();
}
Example #3
Source File: app.component.ts From actions-test with Apache License 2.0 | 6 votes |
constructor(
private menu: MenuController,
private platform: Platform,
private router: Router,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private storage: Storage,
private userData: UserData,
private swUpdate: SwUpdate,
private toastCtrl: ToastController,
) {
this.initializeApp();
}
Example #4
Source File: tutorial.spec.ts From actions-test with Apache License 2.0 | 6 votes |
describe('TutorialPage', () => {
let fixture, app;
beforeEach(async(() => {
const menuSpy = jasmine.createSpyObj('MenuController', [
'toggle',
'enable'
]);
const routerSpy = jasmine.createSpyObj('Router', ['navigateByUrl']);
TestBed.configureTestingModule({
declarations: [TutorialPage],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [IonicStorageModule.forRoot()],
providers: [
{ provide: MenuController, useValue: menuSpy },
{ provide: Router, useValue: routerSpy }
]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TutorialPage);
app = fixture.debugElement.componentInstance;
});
it('should create the tutorial page', () => {
expect(app).toBeTruthy();
});
it('should check the tutorial status', async () => {
const didTuts = await app.storage.get('ion_did_tutorial');
expect(didTuts).toBeFalsy();
});
});
Example #5
Source File: analysis.page.ts From casual-chess with GNU General Public License v3.0 | 6 votes |
constructor(
private afs: AngularFirestore,
private route: ActivatedRoute,
private navCtrl: NavController,
private http: HttpClient,
private menuController: MenuController,
public alertController: AlertController,
public translate: TranslateService,
private utils: UtilsService,
private configurationService: ConfigurationService,
private toast: ToastController,
public modalController: ModalController) {
}
Example #6
Source File: position.page.ts From casual-chess with GNU General Public License v3.0 | 6 votes |
constructor(
private afs: AngularFirestore,
private route: ActivatedRoute,
private navCtrl: NavController,
private http: HttpClient,
private menuController: MenuController,
public alertController: AlertController,
public translate: TranslateService,
private utils: UtilsService,
private configurationService: ConfigurationService,
private toast: ToastController,
public modalController: ModalController) {
}
Example #7
Source File: main.component.ts From WiLearning with GNU Affero General Public License v3.0 | 6 votes |
constructor(
public profile: ProfileService,
public peer: PeerService,
public chat: ChatService,
public classroom: ClassroomService,
public i18n: I18nService,
private menu: MenuController,
private platform: Platform,
private router: Router,
private signaling: SignalingService,
private logger: LoggerService,
private eventbus: EventbusService,
private popoverController: PopoverController,
private modalController: ModalController,
private ds: DocumentService,
private alert: AlertController,
private media: MediaService,
) {
this.initializeApp();
window.onunload = async (e) => {
await this.signaling.sendClosePeer(this.classroom.bClassStarter);
};
}
Example #8
Source File: sidemenu-content.component.ts From fyle-mobile-app with MIT License | 5 votes |
constructor(
private router: Router,
private userEventService: UserEventService,
private menuController: MenuController,
private freshChatService: FreshChatService
) {}
Example #9
Source File: app.component.spec.ts From actions-test with Apache License 2.0 | 5 votes |
describe('AppComponent', () => {
let eventsSpy,
menuSpy,
routerSpy,
userDataSpy,
statusBarSpy,
splashScreenSpy,
swUpdateSpy,
platformReadySpy,
platformSpy,
app,
fixture;
beforeEach(async(() => {
eventsSpy = jasmine.createSpyObj('Events', ['subscribe']);
menuSpy = jasmine.createSpyObj('MenuController', ['toggle', 'enable']);
routerSpy = jasmine.createSpyObj('Router', ['navigateByUrl']);
userDataSpy = jasmine.createSpyObj('UserData', ['isLoggedIn', 'logout']);
statusBarSpy = jasmine.createSpyObj('StatusBar', ['styleDefault']);
splashScreenSpy = jasmine.createSpyObj('SplashScreen', ['hide']);
swUpdateSpy = jasmine.createSpyObj('SwUpdate', ['available', 'activateUpdate']);
platformReadySpy = Promise.resolve();
platformSpy = jasmine.createSpyObj('Platform', { ready: platformReadySpy });
TestBed.configureTestingModule({
declarations: [AppComponent],
imports: [IonicStorageModule.forRoot()],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [
{ provide: Events, useValue: eventsSpy },
{ provide: MenuController, useValue: menuSpy },
{ provide: Router, useValue: routerSpy },
{ provide: UserData, useValue: userDataSpy },
{ provide: StatusBar, useValue: statusBarSpy },
{ provide: SplashScreen, useValue: splashScreenSpy },
{ provide: SwUpdate, useValue: swUpdateSpy },
{ provide: Platform, useValue: platformSpy }
]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
app = fixture.debugElement.componentInstance;
});
it('should create the app', () => {
expect(app).toBeTruthy();
});
it('should initialize the app', async () => {
expect(platformSpy.ready).toHaveBeenCalled();
await platformReadySpy;
expect(statusBarSpy.styleDefault).toHaveBeenCalled();
expect(splashScreenSpy.hide).toHaveBeenCalled();
});
});
Example #10
Source File: tutorial.ts From actions-test with Apache License 2.0 | 5 votes |
constructor(
public menu: MenuController,
public router: Router,
public storage: Storage
) {}
Example #11
Source File: app.component.spec.ts From WiLearning with GNU Affero General Public License v3.0 | 5 votes |
describe('AppComponent', () => {
let menuSpy,
routerSpy,
userDataSpy,
statusBarSpy,
splashScreenSpy,
swUpdateSpy,
platformReadySpy,
platformSpy,
app,
fixture;
beforeEach(async(() => {
menuSpy = jasmine.createSpyObj('MenuController', ['toggle', 'enable']);
routerSpy = jasmine.createSpyObj('Router', ['navigateByUrl']);
userDataSpy = jasmine.createSpyObj('UserData', ['isLoggedIn', 'logout']);
statusBarSpy = jasmine.createSpyObj('StatusBar', ['styleDefault']);
splashScreenSpy = jasmine.createSpyObj('SplashScreen', ['hide']);
swUpdateSpy = jasmine.createSpyObj('SwUpdate', ['available', 'activateUpdate']);
platformReadySpy = Promise.resolve();
platformSpy = jasmine.createSpyObj('Platform', { ready: platformReadySpy });
TestBed.configureTestingModule({
declarations: [AppComponent],
imports: [IonicStorageModule.forRoot()],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [
{ provide: MenuController, useValue: menuSpy },
{ provide: Router, useValue: routerSpy },
{ provide: UserData, useValue: userDataSpy },
{ provide: StatusBar, useValue: statusBarSpy },
{ provide: SplashScreen, useValue: splashScreenSpy },
{ provide: SwUpdate, useValue: swUpdateSpy },
{ provide: Platform, useValue: platformSpy }
]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
app = fixture.debugElement.componentInstance;
});
it('should create the app', () => {
expect(app).toBeTruthy();
});
it('should initialize the app', async () => {
expect(platformSpy.ready).toHaveBeenCalled();
await platformReadySpy;
expect(statusBarSpy.styleDefault).toHaveBeenCalled();
expect(splashScreenSpy.hide).toHaveBeenCalled();
});
});