当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript CookieService.set方法代码示例

本文整理汇总了TypeScript中ngx-cookie-service.CookieService.set方法的典型用法代码示例。如果您正苦于以下问题:TypeScript CookieService.set方法的具体用法?TypeScript CookieService.set怎么用?TypeScript CookieService.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ngx-cookie-service.CookieService的用法示例。


在下文中一共展示了CookieService.set方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

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

示例2: ngOnInit

  ngOnInit(): void {
    this.getData(this.route.snapshot.paramMap.get('id'));
    this.cookieService.set( 'X-XSRF-TOKEN', this.cookieService.get('XSRF-TOKEN') );

    this.formGroup.setValue({
      'email': this.apartment.email
    });
  }
开发者ID:nsarvar,项目名称:animus-frontend,代码行数:8,代码来源:apartment-modify.component.ts

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

示例4:

 return this.sbx.login(username, password, 222).then(data => {
   if (this.log) {
     console.log('nope');
     return false; }
   if (data.success) {
     this.sbx.updateCookieToken(data.token);
     this.cookie.set('user_id', data.user.id);
     this.log = true;
   }
   return data.success;
 }).catch(err => {
开发者ID:caberrio,项目名称:movies,代码行数:11,代码来源:auth.service.ts

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

示例6: setCookieValue

 setCookieValue(key: string, value: string, expireDate?: Date, path?: string): void {
     this.cookie.set(key, value, expireDate, path);
 }
开发者ID:staneee,项目名称:ABPTemplateUI-ng-alain,代码行数:3,代码来源:utils.service.ts

示例7: addCookie

    // STEPS TO WRITING A REVIEW
    // 1) All required fields are filled out
    // 2) Check if cookie exists, else create
    // 3) If cookie exists and no review then add new review
    addCookie(c_id: string) {
        const cookieCollection = this.db.collection('cookies');

        this.cs.set('c_id', c_id);
        return cookieCollection.add({'_id': c_id}).catch(err => { return console.error(err)});
    }
开发者ID:teandrew,项目名称:pathFinder,代码行数:10,代码来源:review.service.ts

示例8: resolve

 .then(function(docRef) {
     this.cookieService.set("userId", docRef.id );
     this.jogoService.acrescentaJogador(jogoId);
     resolve(docRef.id);
 }.bind(this))
开发者ID:HermanoLeite,项目名称:fodinha,代码行数:5,代码来源:jogador.service.ts

示例9: resolve

 this.jogos.add(jogo).then(function(docRef) {
     this.cookieService.set("jogoId", docRef.id );
     resolve(docRef.id);
 }.bind(this))
开发者ID:HermanoLeite,项目名称:fodinha,代码行数:4,代码来源:jogo.service.ts

示例10: setVisaoCarta

 setVisaoCarta(visaoCarta) {
     this.cookieService.set("visaoCarta", visaoCarta );
 }
开发者ID:HermanoLeite,项目名称:fodinha,代码行数:3,代码来源:jogo.service.ts


注:本文中的ngx-cookie-service.CookieService.set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。