You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
717 B
TypeScript
31 lines
717 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { NavController } from '@ionic/angular';
|
|
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
|
|
|
@Component({
|
|
selector: 'app-home',
|
|
templateUrl: './home.component.html',
|
|
styleUrls: ['./home.component.scss'],
|
|
})
|
|
export class HomeComponent implements OnInit {
|
|
isSkip: boolean = false;
|
|
setTime: number = 5;
|
|
constructor(public nav: NavController,) { }
|
|
|
|
ngOnInit() { }
|
|
skip() {
|
|
this.nav.pop();
|
|
CommonService.SKIP = true;
|
|
}
|
|
setTimer() {
|
|
setTimeout(() => {
|
|
this.setTime--;
|
|
if (this.setTime == 0) {
|
|
this.isSkip = true;
|
|
} else {
|
|
this.setTimer();
|
|
}
|
|
}, 1000);
|
|
}
|
|
}
|