-
Notifications
You must be signed in to change notification settings - Fork 0
/
SharedServiceService.ts
68 lines (65 loc) · 1.53 KB
/
SharedServiceService.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import {Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class SharedServiceService {
sec Transfer=0;
min Transfer!:number; timerStart:number=0;
correctAnswer!:number;
incorrectAnswer!:number;
totalAnswer!: number;
totalQues!:number;
setSec1Transfer!:number;
correctAnsArray:any=[]; incorrectAnsArray: any=[];
skippedQuesArr:any=[];
constructor(){}
setSeconds(sec: any)
{ this.secTransfer=sec;
localStorage.setItem(sec,JSON.stringify(this.secTransfer));
}
getSeconds(){
return this.secTransfer;
}
setMin(min:number)
{ this.minTransfer=min;
}
getMin(){ return this.minTransfer;
}
setTimerStart(timerNum: number){ this.timerStart=timerNum;
}
getTimerStart(){ return this.timerStart;
}
setCorrectAnswer(crtAns:number){
this.correctAnswer=crtAns;
}
getCorrectAnswer(){
return this.correctAnswer;
setIncorrectAnswer(incrtAns:number){ this.incorrectAnswer=incrtAns;
}
getincorrectAnswer(){
return this.incorrectAnswer;
}
setTotalAns(totalAns:number){ this.totalAnswer=totalAns;
}
getTotalAnswer(){ return this.totalAnswer;
}
setTotalQues (tQues:number){
this.totalQues=tQues;
}
getTotalQues(){ return this.totalQues;
}
setCorrectAnsArray(crtAnsArr:any=[]){ this.correctAnsArray=crtAnsArr;
console.log("setter"+this.correctAnsArray);
}
getCorrectAnsArray(){ return this.correctAnsArray;
}
setIncorrectAnsArray(incrtAnsArr:any=[]){ this.incorrectAnsArray=incrtAnsArr;
}
getIncorrectAnsArray(){
return this.incorrectAnsArray;
}
setSkippedQuesArr(skpQA:any=[]){ this.skippedQuesArr=skpQA;
}
getSkippedQuesArr(){ return this.skippedQuesArr;
}
}