Angular @ViewChild Error: Expected 2 arguments, but got 1. ts (2554).
i am a new learner and right now i am stuck at a point where i dont understand why am i getting this error to my export class @ViewChild('namInput') this line of code is then underlined with RED color, and i can't seem to fix this. i also did an update but it is still the same. can someone plz help me out?
code example :
import { Component, OnInit, ElementRef, ViewChild} from '@angular/core';
export class ShoppingEditComponent implements OnInit {
- @ViewChild('nameInput') nameInputRef: ElementRef;
- @ViewChild('amountInput') amountInputRef: ElementRef;