Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ion-header>
- <ion-navbar>
- <ion-title text-center>Jugar</ion-title>
- </ion-navbar>
- </ion-header>
- <ion-content padding>
- <div class="card">
- <div class="item item-text-wrap">
- <div class="loader">
- <p class="percent">{{progressPercent}}segundos</p>
- </div>
- </div>
- </div>
- </ion-content>
- import { Component } from '@angular/core';
- import { IonicPage, NavController, NavParams } from 'ionic-angular';
- @IonicPage()
- @Component({
- selector: 'page-jugar-online',
- templateUrl: 'jugar-online.html',
- })
- export class JugarOnlinePage {
- progressPercent;
- constructor(public navCtrl: NavController, public navParams: NavParams) {
- var count = 60;
- var intervalo = setInterval(function () {
- console.log(count);
- count--;
- this.progressPercent = count;
- if (count == 0) {
- clearInterval(intervalo);
- alert("Se terminó");
- }
- }, 1000);
- }
- ionViewDidLoad() {
- console.log('ionViewDidLoad JugarOnlinePage');
- }
- }
Add Comment
Please, Sign In to add comment