本文整理匯總了TypeScript中ngx-cookie-service.CookieService.get方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript CookieService.get方法的具體用法?TypeScript CookieService.get怎麽用?TypeScript CookieService.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ngx-cookie-service.CookieService
的用法示例。
在下文中一共展示了CookieService.get方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: ngOnInit
ngOnInit() {
this.studentInfoservice.getStudentinfoforRegistration(this.cookie.get('loginID'))
.then(data => {
this.currStudent = data;
// console.log(this.currStudent);
$("#stuFullName").text(this.currStudent.studentName);
});
this.studentInfoservice.getStudentAvaImage(this.cookie.get('loginID'))
.then(data => {
$("#smallPhoto").attr("src", "http://oms.saigontech.edu.vn/oms_app/Saigontech_College/student/image/" + data);
});
this.semesterService.getAcademicYear()
.then(data => {
this.academicYearInfo = data;
this.semesterService.getSemesterInformation()
.then(data1 => {
console.log(data1);
this.currSemester = data1;
this.getAllClassStatus(data1.acaYear, data1.semester, '-1');
});
});
}
示例2:
.then(data => {
this.currSemester = data;
this.studentInfoservice.getStudentinfoforRegistration1(this.currSemester.acaYear, this.currSemester.semester,this.cookie.get('loginID'))
.then(data => {
this.currStudent = data;
console.log(this.currStudent);
$("#stuFullName").text(this.currStudent.studentName);
});
this.studentInfoservice.getStudentAvaImage(this.cookie.get('loginID'))
.then(data => {
$("#smallPhoto").attr("src", "http://oms.saigontech.edu.vn/oms_app/Saigontech_College/student/image/" + data);
});
this.ESLClassService.getESLClassRegistered(this.currStudentID
, this.currSemester.acaYear
, this.currSemester.semester)
.then(data1 => {
console.log(data1);
this.eslClassregistered = data1;
});
this.ESLClassService.getESLClassAvailable(this.currStudentID
, this.currSemester.acaYear
, this.currSemester.semester)
.then(data2 => {
console.log(data2);
this.eslClassavailable = data2;
});
});
示例3:
.then(data => {
//get information of current semester.
this.currSemester = data;
console.log(this.currSemester);
this.studentInfoservice.getStudentinfoforRegistration1(this.currSemester.acaYear, this.currSemester.semester, this.cookie.get('loginID'))
.then(data => {
//get information of current student.
this.currStudent = data;
console.log(this.currStudent);
$("#stuFullName").text(this.currStudent.studentName);
});
this.studentInfoservice.getStudentAvaImage(this.cookie.get('loginID'))
.then(data => {
//push image to navbar.
$("#smallPhoto").attr("src", "http://oms.saigontech.edu.vn/oms_app/Saigontech_College/student/image/" + data);
});
this.eslSEOIService.getESLSEOIQuestionList('0', data.acaYear, data.semester)
.then(data1 => {
//get question list of this ESL SEOI.
console.log(data1);
this.questions = data1;
});
this.eslSEOIService.getTeacherInfo(this.cookie.get('ESLteacherID'),this.cookie.get('ESLclassID'))
.then(data2 => {
//get teacher of this class.
this.currInformation = data2;
console.log(this.currInformation);
});
});
示例4: ngOnInit
ngOnInit() {
this.currStudentID = this.cookie.get('loginID');
this.eslSEOIService.getSystemTime()
.then(data => {
this.currSemester = data;
this.studentInfoservice.getStudentinfoforRegistration1(this.currSemester.acaYear, this.currSemester.semester, this.cookie.get('loginID'))
.then(data => {
//get information of current student.
this.currStudent = data;
console.log(this.currStudent);
$("#stuFullName").text(this.currStudent.studentName);
});
this.studentInfoservice.getStudentAvaImage(this.cookie.get('loginID'))
.then(data => {
//push the arvatar to navbar.
$("#smallPhoto").attr("src", "http://oms.saigontech.edu.vn/oms_app/Saigontech_College/student/image/" + data);
});
console.log(data);
//get list of class that have SEOI. with status.
this.eslSEOIService.getESLSEOIList(this.currStudentID, data.acaYear, data.semester)
.then(data1 => {
console.log(data1);
this.listOfClassSEOI = data1;
});
});
}
示例5: constructor
constructor(private http: Http, private connectionLink: ConnectionService, private cookie: CookieService) {
this.headers = new Headers();
this.headers.append('Content-Type', 'application/json');
this.headers.append('Authorization', 'Bearer ' + this.cookie.get('token'));
this.options = new RequestOptions({ headers: this.headers });
}
示例6: addComment
addComment(studentID: string, semester: string, acaYear: string, teacherID: string, classID: string, comment: string) {
let newCommentSEOI = {
studentID: studentID,
acaYear: acaYear,
Semester: semester,
classID: classID,
instructorID: teacherID,
comment: comment
}
$.ajax({
type: "POST",
url: this.connectionLink.getConnection() + "/insertESLSEOICommentREST",
data: newCommentSEOI,
dataType: "text",
headers: {
'Authorization': 'Bearer ' + this.cookie.get('token')
},
cache: false,
success: function (response) {
// var notification0 = new PNotify({
// title: 'Notification: ',
// text: response
// });
},
error: function (data) {
console.log(data);
}
})
}
示例7: constructor
constructor(private cookieService: CookieService) {
super();
const csrftoken = this.cookieService.get('csrftoken');
if (csrftoken) {
this.headers.set('X-CSRFToken', csrftoken);
}
}
示例8: addVnclass
addVnclass(studentID: string, acaYear: string, Semester: string, checkedCodes: string) {
let classObject = {
studentCode: studentID,
acaYear: acaYear,
Semester: Semester,
ipAddress: "123",
classCodeOpen: checkedCodes
}
$.ajax({
type: "POST",
url: this.connectionLink.getConnection()+"/insertVncourseREST",
data: classObject,
headers: {
'Authorization':'Bearer ' + this.cookie.get('token')
},
dataType: "text",
success: function(response)
{
var notification0 = new PNotify({
title: 'Notification: ',
text: response
});
},
error: function(data){
console.log(data);
}
})
}
示例9:
this.rs.getCourseReviews(this.course.code).subscribe(data => {
this.reviews = data;
if (this.cs.get('c_id'))
this.userReviewed = data
.find(review =>
review['reviewedBy'] == this.cs.get('c_id')) ? true : false;
})
示例10: deleteESLClass
deleteESLClass(studentID: string, acaYear: string, Semester: string, classCodes: string) {
let classObject = {
studentCode: studentID,
acaYear: acaYear,
Semester: Semester,
ipAddress: "123",
classCodes: classCodes,
}
$.ajax({
type: "POST",
url: this.connectionLink.getConnection()+"/deleteEslcourseREST",
data: classObject,
dataType: "text",
headers: {
'Authorization':'Bearer ' + this.cookie.get('token')
},
cache: false,
success: function(response)
{
var notification0 = new PNotify({
title: 'Notification: ',
text: response
});
},
error: function(data){
alert(data);
}
})
}