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


TypeScript FormGroup.getRawValue方法代码示例

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


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

示例1:

            .subscribe((response: FormGroup) => {
                if ( !response )
                {
                    return;
                }

                this._contactsService.updateContact(response.getRawValue());
            });
开发者ID:karthik12ui,项目名称:fuse-angular-full,代码行数:8,代码来源:contacts.component.ts

示例2: oncklick

 /**
  * Gets and checks the login form data
  */
 oncklick() {
   const  credentials = this.login.getRawValue();
   if (credentials.email === 'finnziehe@mailbox.org' && credentials.password === 'bacon1234' ) {
     this.router.navigate(['/menue']);
     this.setloggin(true);
   } else {
     alert('Falsche Daten');
   }
 }
开发者ID:University-of-Potsdam-MM,项目名称:Tool.UP,代码行数:12,代码来源:login.component.ts

示例3: signup

 signup() {
     const newUser = this.signupForm.getRawValue() as NewUser;
     this.signUpService
         .signup(newUser)
         .subscribe(
             () => this.router.navigate(['']),
             err => console.log(err)
         );
 }
开发者ID:bonejah,项目名称:Alura,代码行数:9,代码来源:singup.component.ts

示例4: addNumbers

 addNumbers() {
     const value: {
         numberA: string,
         numberB: string
     } = this.calculatorForm.getRawValue();
     const numberA = parseInt(value.numberA);
     const numberB = parseInt(value.numberB);
     this.result = this.calculator.addNumbers(numberA, numberB);
 }
开发者ID:loki2302,项目名称:html5-experiment,代码行数:9,代码来源:app.component.ts

示例5: saveProduct

    /**
     * Save product
     */
    saveProduct(): void
    {
        const data = this.productForm.getRawValue();
        data.handle = FuseUtils.handleize(data.name);

        this._ecommerceProductService.saveProduct(data)
            .then(() => {

                // Trigger the subscription with new data
                this._ecommerceProductService.onProductChanged.next(data);

                // Show the success message
                this._matSnackBar.open('Product saved', 'OK', {
                    verticalPosition: 'top',
                    duration        : 2000
                });
            });
    }
开发者ID:karthik12ui,项目名称:fuse-angular-full,代码行数:21,代码来源:product.component.ts

示例6: addRepository

  addRepository() {
    this.isProcessing = true;
    this.addRepositoryForm.disable();

    this.http.post(
      '/v1/api/helm/repositories',
      this.addRepositoryForm.getRawValue()
    ).pipe(
      catchError(error => {
        this.notifications.display('error', '', error.statusText);
        return of(new ErrorEvent(error));
      })
    ).subscribe(result => {
      this.isProcessing = false;
      this.addRepositoryForm.enable();
      // TODO
      if (!(result instanceof ErrorEvent)) {
        window.location.reload();
      }
    });
  }
开发者ID:supergiant,项目名称:supergiant,代码行数:21,代码来源:apps-add.component.ts

示例7: login

  /**
   * Login with current user/pass
   */
  public login(): void {

    if (this.formGroup.valid) {
      this.formGroup.disable();
      // -->Set: data
      const data = this.formGroup.getRawValue();
            data.grant_type = 'password';

      this.http.login(data)
          .subscribe(ok => {

            this.router.navigate(['/dashboard']);

          }, err => {
            console.error('error', err);
            setTimeout(() => { this.formGroup.enable(); }, 1500);
          });
    } else {
      const errors = SuperForm.getAllErrorsFlat(this.formGroup);
      console.error(errors);
    }
  }
开发者ID:guichafy,项目名称:angular5-starter,代码行数:25,代码来源:login.component.ts

示例8: switch

 .subscribe(response => {
     if ( !response )
     {
         return;
     }
     const actionType: string = response[0];
     const formData: FormGroup = response[1];
     switch ( actionType )
     {
         /**
          * Send
          */
         case 'send':
             console.log('new Mail', formData.getRawValue());
             break;
         /**
          * Delete
          */
         case 'delete':
             console.log('delete Mail');
             break;
     }
 });
开发者ID:karthik12ui,项目名称:fuse-angular-full,代码行数:23,代码来源:main-sidebar.component.ts

示例9: createPost

 createPost() {
   return this.store
     .dispatch(createPost(this.postForm.getRawValue()));
 }
开发者ID:serioga-ninja,项目名称:blog-project,代码行数:4,代码来源:new-post.component.ts

示例10: reset

 reset() {
   const val = this.form.getRawValue();
   this.graph.post(`{resetPassword(username:"${val.username}",email:"${val.email}")}`).subscribe(res => {
     this.router.navigate(['/login']);
   })
 }
开发者ID:OysteinAmundsen,项目名称:gymsystems,代码行数:6,代码来源:reset.component.ts


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