Linked Questions

2 votes
1 answer
1k views

I have a child component in which I have rendered the text form input controls. My submit button is rendered in parent component so while submitting the form I am getting the empty data. parent-...
Sandy Sanap's user avatar
37 votes
2 answers
32k views

I have component which has a form and some child components within the form. The child components are created using *ngFor and each child contains input elements. Angular2 compiler is giving errors ...
Sumit Agarwal's user avatar
17 votes
4 answers
29k views

I am adding form input fields using component - engine-add-contact-form.html <form (ngSubmit)="onSubmit()" [formGroup]="contact_form"> <md-tab-group> <md-tab label="Form"> ...
user3384985's user avatar
  • 3,017
12 votes
2 answers
8k views

I have two components: ParentComponent and ChildComponent: parent.component.ts <form #form="ngForm" (ngSubmit)="onSubmit(form)" novalidate> <input type="text" name="firstControl" [(...
Jaroslaw K.'s user avatar
  • 5,414
5 votes
2 answers
4k views

I have 2 components, a parent component and a child component. The parent component contains the following: <form (ngSubmit)="saveWebsite();" #adminForm="ngForm"> <input type="...
xaisoft's user avatar
  • 3,461
7 votes
1 answer
3k views

I have a ng-template which is being passed on from one of my component and i have a placeholder to accept the passed on ng-template onto my component as shown below in ngTemplateOutlet. <div> &...
Nijas Nizam's user avatar
1 vote
3 answers
12k views

I have a quite complicated form which I want to break down into individual components. Here is my base form (only taken example fields), I'm using FormBuilder: ngOnInit() { this.predictorQuestion = ...
Ishan Khare's user avatar
  • 1,767
3 votes
1 answer
5k views

Note: I have seen several questions like my title, but they don't solve my problem. Like: Angular2 Parent Component with multiple instances of child component (just code error) Instance Angular 2 ...
Rico's user avatar
  • 634
0 votes
1 answer
4k views

I want to create a custom component with multiple input controlls which I can use in other components forms including the validation. The only examples I could find show how to create a simple ...
squadwuschel's user avatar
  • 3,448
1 vote
1 answer
3k views

I've been using the answers (and the article within) from Angular2 nested template driven form to use child-nested form controls. Which is great until I try to use the child component within a Ng-...
forgetfulbur's user avatar
2 votes
1 answer
2k views

I'd like to transfer my ngForm and ngModelGroup from parent component to child component and also use form validation functionality in the child component. Parent component.html: <md-step [...
Deniss M.'s user avatar
  • 4,140
2 votes
1 answer
1k views

I have a template with two fields for.eg name and age, that needs to cloned and appended to the same container. I achieved this using the following code. html file <ng-template #tpl> <div ...
devipriya's user avatar
4 votes
1 answer
1k views

While building more complex reactive forms I stumbled across an issue while nesting reactiveFormGroups more than once. So I've got two scenarios: Form Component -> Form Partial Component -> Custom ...
danielreiser's user avatar
  • 5,360
0 votes
1 answer
1k views

I have some existing code that's structured more or less like this: <!-- my-form.html --> <form ngNativeValidate> <my-other-component></my-other-component> <button ...
Ryan Lester's user avatar
  • 2,413
3 votes
2 answers
812 views

Here's the situation: parent.component.html <form #someForm > <input type="text" name="title" [(ngModel)]="parentVar" /> <child-component /> <input type="submit" [disabled]...
Ben's user avatar
  • 4,328

15 30 50 per page