<form [formGroup]="profileForm"> Thanks, Nitin Gupta Software Architect/Developer Linked In Profile: www.linkedin.com/in/ngpsi/ 359 Lakeshore Drive Pleasantville, NY 10570 914-506-7734 [email protected] skype Id: nitin.gupta472
On Thu, Jun 25, 2020 at 2:00 PM Maureen Moore <[email protected]> wrote: > <form name="test"> > <div class="quantity" [formGroup]="myGroup"> > <button class="minus-btn" (click)="minus()" type="button" name="button"> > <img src="../assets/images/minus.svg" alt="minus" /> > </button> > <input pattern="^(0|\+?[1-9]\d*)$" class="num" name="quantity" > [value]="quantity" formControlName="int" ng-minlength="0" type="text"> > <button class="plus-btn" (click)="plus()" type="button" name="button"> > <img src="../assets/images/plus.svg" alt="plus" /></button> > </div> > <form> > > > On Thursday, June 25, 2020 at 1:38:14 PM UTC-4, bastien lemaire wrote: >> >> The fault may lie within this app-app-button... what's the html of that >> component? >> >> Le jeu. 25 juin 2020 à 19:21, Maureen Moore <[email protected]> a écrit : >> >>> The following that I didn't include because I didn't think it was >>> important was causing the error: <app-quantity-button></app-quantity-button> >>> >>> On Thursday, June 25, 2020 at 12:02:27 PM UTC-4, Maureen Moore wrote: >>>> >>>> I don't even have a formControlName at all but I keep getting this >>>> error: >>>> >>>> core.js:6260 ERROR Error: formControlName must be used with a parent >>>> formGroup directive. You'll want to add a formGroup >>>> directive and pass it an existing FormGroup instance (you can >>>> create one in your class). >>>> This is all I have in my code: >>>> shopping-cart.component.html >>>> <form> >>>> <div id="cartItemsList"> >>>> <ul> >>>> <li *ngFor="let product of products"> >>>> <div>{{product.name }}</div> >>>> <div><img src="../assets/images/gallery/{{product.thumbnail}}" >>>> /></div> >>>> <div>{{product.price }}</div> >>>> <button type="button" class="btnAddAction">Add to Cart</button> >>>> </li> >>>> </ul> >>>> </div> >>>> </form> >>>> >>>> >>>> shopping-cart.component.ts >>>> >>>> import { Component, OnInit } from '@angular/core'; >>>> import { AngularFireDatabase, AngularFireList } from >>>> 'angularfire2/database'; >>>> import { Observable } from 'rxjs'; >>>> import * as firebase from 'firebase/app'; >>>> >>>> >>>> >>>> >>>> @Component({ >>>> selector: 'app-shopping-cart', >>>> templateUrl: './shopping-cart.component.html', >>>> styleUrls: ['./shopping-cart.component.scss'] >>>> }) >>>> >>>> >>>> export class ShoppingCartComponent implements OnInit { >>>> >>>> >>>> products: any[]; >>>> >>>> >>>> constructor(public db: AngularFireDatabase){ >>>> db.list('/products') >>>> .valueChanges().subscribe(products=>{ >>>> this.products=products; >>>> }); >>>> } >>>> >>>> ngOnInit(): void { >>>> } >>>> } >>>> >>>> >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Angular and AngularJS discussion" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/angular/5b5cfedc-3a5e-42b9-ba0d-1d0136e1b79do%40googlegroups.com >>> <https://groups.google.com/d/msgid/angular/5b5cfedc-3a5e-42b9-ba0d-1d0136e1b79do%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "Angular and AngularJS discussion" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/angular/aa7a75a7-4864-419e-8fa4-981b7f38538bo%40googlegroups.com > <https://groups.google.com/d/msgid/angular/aa7a75a7-4864-419e-8fa4-981b7f38538bo%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/CAPE2-%2Bd-PdT4W926PywWC73s49fw%3DsTS5zMidE2_2ZTxn8Gqpg%40mail.gmail.com.
