Skip to content

Instantly share code, notes, and snippets.

@Hawksbillcat
Created February 20, 2019 07:15
Show Gist options
  • Save Hawksbillcat/9bfbdb8a93c55546caa3fd22ab8f9295 to your computer and use it in GitHub Desktop.
Save Hawksbillcat/9bfbdb8a93c55546caa3fd22ab8f9295 to your computer and use it in GitHub Desktop.
export class HomePage {
oo:boolean=false;
constructor(public navCtrl: NavController,
public navParams: NavParams,
public plt: Platform,
private ref:ChangeDetectorRef,
public dp: DataProvider,
public http: Http,
public htttp:HttpClient,
private networkinterface:NetworkInterface,
private storage:Storage,
public loading:LoadingController,
public alertctrl:AlertController,
public ev:Events,
){
this.oo=true;
}
openNavDetailsPage(index:number) {
let id =index;
this.oo=true;
console.log("this.oo in open = "+this.oo)
setTimeout(() => {
this.oo=false;
console.log("this.oo in open in= "+this.oo)
},3000);
}
}
--------------------------
<ion-content >
<ion-list no-lines> //this is dynamical button
<button ion-item *ngFor="let item of irislist; let i = index;" style="height:60px;border-bottom: 1px grey solid;" (click)="openNavDetailsPage(i)" icon-start>
<img src="./assets/imgs/IRIS_s.png" style="width:8vmin;height:8vmax;padding-bottom: 5px;" item-start>
{{item.title}} {{item.room}} {{item.No_IP}}
</button>
</ion-list>
</ion-content>
<div class="use-absolute" *ngIf="oo">
<ion-spinner ></ion-spinner>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment