Guest User

Untitled

a guest
Mar 18th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <ion-header>
  2.  
  3. <ion-navbar>
  4. <ion-title text-center>Jugar</ion-title>
  5. </ion-navbar>
  6.  
  7. </ion-header>
  8.  
  9. <ion-content padding>
  10. <div class="card">
  11. <div class="item item-text-wrap">
  12. <div class="loader">
  13. <p class="percent">{{progressPercent}}segundos</p>
  14. </div>
  15. </div>
  16. </div>
  17. </ion-content>
  18.  
  19. import { Component } from '@angular/core';
  20. import { IonicPage, NavController, NavParams } from 'ionic-angular';
  21.  
  22. @IonicPage()
  23. @Component({
  24. selector: 'page-jugar-online',
  25. templateUrl: 'jugar-online.html',
  26. })
  27. export class JugarOnlinePage {
  28. progressPercent;
  29. constructor(public navCtrl: NavController, public navParams: NavParams) {
  30. var count = 60;
  31. var intervalo = setInterval(function () {
  32. console.log(count);
  33. count--;
  34. this.progressPercent = count;
  35. if (count == 0) {
  36. clearInterval(intervalo);
  37. alert("Se terminó");
  38. }
  39. }, 1000);
  40. }
  41.  
  42. ionViewDidLoad() {
  43. console.log('ionViewDidLoad JugarOnlinePage');
  44. }
  45.  
  46. }
Add Comment
Please, Sign In to add comment