本文整理匯總了TypeScript中ionic-framework/ionic.NavController.setRoot方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript NavController.setRoot方法的具體用法?TypeScript NavController.setRoot怎麽用?TypeScript NavController.setRoot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ionic-framework/ionic.NavController
的用法示例。
在下文中一共展示了NavController.setRoot方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: goToHome
goToHome(){
if (this.loggedIn()) {
this.nav.setRoot(TabsPage);
} else {
this.nav.setRoot(IntroPage)
}
}
示例2: crearServicioCopas
private crearServicioCopas(numCopas: number, numBirras: number,numChupito:number,vector:Array<{tipo:number, hora:Date}>,fecha: string) {
this._copasService.setFechaResaca(fecha);
let nivBorr: number = 0;
let copasTotal = (numBirras/2) + numCopas;
if(copasTotal%3>0){
this._copasService.setContadorBirras(numBirras%3);
this._copasService.setContadorCopas(numCopas%3);
this._copasService.setContadorChupitos(numChupito%3);
}
this._copasService.setBirrasTotales(numBirras);
this._copasService.setCopasTotales(numCopas);
this._copasService.setChupitosTotales(numChupito);
while (copasTotal >= 3) {
nivBorr += 1;
copasTotal = copasTotal-3;
}
this._copasService.setNivelBorrachera(nivBorr);
this._copasService.setDetalleBebido(vector)
this.nav.setRoot(Resacometro);
}
示例3: cargarDatosNuevos
cargarDatosNuevos() {
console.log("Carga datos nuevos");
this._copasService.setFechaResaca(new Date());
this.nav.setRoot(Resacometro);
}