當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript CookieService.get方法代碼示例

本文整理匯總了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');
      });
    });


    

    
  }
開發者ID:nguyenquan263,項目名稱:SMS_System_Final,代碼行數:31,代碼來源:class-status.component.ts

示例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;
          });
      });
開發者ID:nguyenquan263,項目名稱:SMS_System_Final,代碼行數:30,代碼來源:esl-registration.component.ts

示例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);
        });
      });
開發者ID:nguyenquan263,項目名稱:SMS_System_Final,代碼行數:32,代碼來源:esl-seoi-valuation.component.ts

示例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;
          });
      });

  }
開發者ID:nguyenquan263,項目名稱:SMS_System_Final,代碼行數:32,代碼來源:esl-seoi-listing.component.ts

示例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 });
  }
開發者ID:nguyenquan263,項目名稱:SMS_System_Final,代碼行數:7,代碼來源:esl-seoi-service.service.ts

示例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);
      }
    })


  }
開發者ID:nguyenquan263,項目名稱:SMS_System_Final,代碼行數:34,代碼來源:esl-seoi-service.service.ts

示例7: constructor

 constructor(private cookieService: CookieService) {
     super();
     const csrftoken = this.cookieService.get('csrftoken');
     if (csrftoken) {
         this.headers.set('X-CSRFToken', csrftoken);
     }
 }
開發者ID:iamthegoodbot,項目名稱:skazka_integrations,代碼行數:7,代碼來源:custom-request-options.ts

示例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);
      }
  })
  }
開發者ID:nguyenquan263,項目名稱:SMS_System_Final,代碼行數:31,代碼來源:vnclass-service.service.ts

示例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; 
 })
開發者ID:teandrew,項目名稱:pathFinder,代碼行數:7,代碼來源:reviews.component.ts

示例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);
      }
  })
  }
開發者ID:nguyenquan263,項目名稱:SMS_System_Final,代碼行數:31,代碼來源:eslclass-service.service.ts


注:本文中的ngx-cookie-service.CookieService.get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。