I have a FormGroup that was created like that:  form: FormGroup;  constructor(private _formBuilder: FormBuilder) { }  this.form = this._formBuilder.group({   name: ['', Validators.required],   email: ['', Validators.required, Validato...
Im trying to do a custom validation on Angular 5 but I'm facing the following error  Expected validator to return Promise or Observable   I just want to return an error to the form if the value doesnt match the required, heres my code:  This is t...
I have worked with form builder in angular 2/4, But now I am using it in angular 6. I have seen this question (Can't bind to 'formGroup' since it isn't a known property of 'form') but it was for angular 2. I doing exact same a...
I've tried to used reactive forms in my application. But during changing components I got "Cannot find control with unspecified name attribute" error.  My initial TypeScript code is:      onElementChange(): void {         this.activeData...
I wrote the below code snippet, which I considered as it will disable the FormControl in a FormArray.  some.component.html  <form [formGroup]="testForm">     <div *ngFor="let num of countArr">         <input type="t...
I am using angular 6 and i am unable to display the selected option as default in select box,  HTML consists,  <select class="form-control selectBox" name="username" #username="ngModel" required ngModel> <option disab...
I'm having trouble setting the value of a template driven form input. The value is coming from an editMovie object. I want the form to be filled with the editMovie values when shown and the user can then edit a part of the editMovie object or lea...
this question has been asked before for AngularJS and Jquery however I need to do this in Angular 4 and its slightly different.  Situation:  I have a component with a table (Tablecomponent). The table is filled with input fields for users. Now I want...
I am making an angular 6 application using Angular dynamic form, using the link https://angular.io/guide/dynamic-form  Where I am in the need to display the form in nested format...  Scenario 1:  // Filling Project name and description  Initially, th...
I am working a front-end application with Angular 5, and I need to have a search box hidden, but on click of a button, the search box should be displayed and focused.  I have tried a few ways found on StackOverflow with directive or so, but can't...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.