小编Sun*_*ngh的帖子

角反应形式未定义值

我试图显示在文本框中输入的值,但收到“错误 TypeError:无法读取未定义的属性‘值’”错误。

这是我在组件中注册的 formControls:

import { Component } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';


@Component({
  selector: 'app-site-reset',
  templateUrl: './site-reset.component.html',
  styleUrls: ['./site-reset.component.scss']
})
export class SiteResetComponent {
  siteResetForm = new FormGroup({
    attuid: new FormControl(''),
    contactNumber: new FormControl(''),
    vendor: new FormControl(''),
    severity: new FormControl(''),
    siteNum: new FormControl(''),
    reasonSelect: new FormControl(''),
    other: new FormControl(''),
    pilot: new FormControl(''),
    alarms: new FormControl(''),
    adjacent: new FormControl(''),
    reset: new FormControl(''),
    anr: new FormControl(''),
    tickets: new FormControl(''),
    other_action: new FormControl(''),
    date: new FormControl(''),
  }); …
Run Code Online (Sandbox Code Playgroud)

angular angular-reactive-forms

5
推荐指数
1
解决办法
7384
查看次数

ReferenceError:运行我的angular 6通用应用程序时未定义XMLHttpRequest

我已经创建了一个依赖Angularfire2的Angular 6项目。我正在使用Firestore和Firebase存储。我已经将我的应用程序转换为通用角度,当我运行server.js该应用程序时,它说正在监听,localhost:4000但是一旦我用localhost:4200终端打开浏览器,就会显示以下错误:

ReferenceError: XMLHttpRequest is not defined
Run Code Online (Sandbox Code Playgroud)

这是错误的代码片段

firebase angularfire2 angular

2
推荐指数
2
解决办法
1235
查看次数