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


TypeScript ngx-cookie-service.CookieService類代碼示例

本文整理匯總了TypeScript中ngx-cookie-service.CookieService的典型用法代碼示例。如果您正苦於以下問題:TypeScript CookieService類的具體用法?TypeScript CookieService怎麽用?TypeScript CookieService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了CookieService類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

      .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

示例2: 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

示例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.userToken = this.cookieService.get('userToken');
   if (!this.userToken) {
     this.userToken = uuid();
     const date = new Date();
     date.setTime(date.getTime() + (5000 * 24 * 60 * 60 * 1000));
     this.cookieService.set('userToken', this.userToken, date);
   }
 }
開發者ID:gsuveti,項目名稱:primeng-material,代碼行數:9,代碼來源:dev-playground.component.ts

示例5: ngOnInit

 ngOnInit(){
     let pciParams = this.cookieService.get('payBillJson');
     this.cookieService.delete('payBillJson');
     let decodedString = decodeURI(pciParams).replace(new RegExp("%3A", 'g'),":").replace(new RegExp("%2C", 'g'),",")
     let paymentInfo = JSON.parse(decodedString);
     paymentInfo.nickName = this.replaceAll(paymentInfo.nickName,"+"," ");
     let paymentDate = this.replaceAll(paymentInfo.paymentDate,"%2F","/");
     this.store.dispatch(new billingTypes.UpdateCollectivePaymentInfo({paymentAmount:paymentInfo.paymentAmount,paymentDate}))
     this.store.dispatch(new billingTypes.SaveBankInfo(this.billingService.getBankInfoForStore(paymentInfo)))
     this.router.navigate(['/protected/customer/billing/paybill/collective/verify.htm'])
 }
開發者ID:bbachi,項目名稱:Angular5Sample,代碼行數:11,代碼來源:pcitogme.component.ts

示例6: navigateToEvaluation

  //access the evaluation page.
  navigateToEvaluation(status: string, classID: string, teacherID: string){
    if (status == 'Incomplete'){
      // console.log(classID+" "+teacherID);]
      //push teacherid to cookie.
      this.cookie.set('ESLteacherID', teacherID);
      //push classid to cookie.
      this.cookie.set('ESLclassID', classID);
      this.router.navigateByUrl('/ESLSEOIEvaluation');

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

示例7: ToggleCounty

    ToggleCounty(county: string) {
        var selectedCounties = this.cookieService.get(this.favouriteCountiesCookieKey);

        if (selectedCounties.indexOf(county) > -1) {
            selectedCounties = selectedCounties.replace(county + ' ', '');
        } else {
            selectedCounties += county + ' ';
        }

        this.indicators.forEach(indicator => indicator.performers.forEach(performer => performer.favourite = selectedCounties.indexOf(performer.county) > -1));

        this.cookieService.set(this.favouriteCountiesCookieKey, selectedCounties);

        this.LoadData();
    }
開發者ID:OvidiuCaba,項目名稱:StatisticsRomania,代碼行數:15,代碼來源:performers.component.ts

示例8: 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

示例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類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。