當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。