Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul *ngIf="placeholder[0]">
- <li *ngFor="let time of placeholder[0], let i = index" >
- <div><span id="timer0{{i}}"> lol </span><span *ngIf="timer[0].timeLeft[i] > 0"> : {{timer[0].timeLeft[i]}} secondi <button (click)="restart(0, i)"> reset qua</button><button (click)="check()"> check div</button></span></div>
- </li>
- </ul>
- setTime(i: number){
- //setting del timer (azzero tutti i campi)
- this.placeholder[i]=[]
- this.timer[i].lunghezza = Object.keys(this.datiX.fileJson.ricette[this.datiX.postazioniNome[this.datiX.defPostazione]][this.datiX.ricetta[i]]).length;
- for (let j = 0; j < this.timer[i].lunghezza; j++) {
- this.placeholder[i][j] = [""]
- }
- for (let j = 0; j < this.timer[i].lunghezza; j++) {
- this.pauseTimer(i, j);
- this.timer[i].inizio[j] = 0;
- this.timer[i].fine[j] = Object.keys(this.datiX.fileJson.ricette[this.datiX.postazioniNome[this.datiX.defPostazione]][this.datiX.ricetta[i]][j]).length;
- this.timer[i].timeLeft[j] = <number> <unknown>Object.keys(this.datiX.fileJson.ricette[this.datiX.postazioniNome[this.datiX.defPostazione]][this.datiX.ricetta[i]][j][0])[this.timer[i].inizio[j]];
- }
- console.log("check: ",document.getElementById('timer01'))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement