error NG8002: Can't bind to 'matDatepicker' since it isn't a known property of 'input'

Advertisements I am implementing an application using Angular 15. I use Angular Material there. I need to add a date picker and after inserting the code snippet below I’m getting an error. <mat-form-field appearance="outline"> <mat-label>Choose a date</mat-label> <input formControlName="freshness" matInput [matDatepicker]="picker"> <mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle> <mat-datepicker #picker></mat-datepicker> </mat-form-field> Error: Error: src/app/dialog/dialog.component.html:18:51 – error NG8002: Can’t bind… Read More error NG8002: Can't bind to 'matDatepicker' since it isn't a known property of 'input'

How to get statusCode in angular

Advertisements How can I make a method that return the status Code of the request? I’m using angular 15. My get method in service: public getData( ano: any, mes: any, glosadas: any, pagina:any): Observable<any> { const token = this.token.retornaToken(); const headers = new HttpHeaders({ Authorization: `Bearer ${token}` }); return this.http.get(`API/?TpoRelatorio=1 &SomenteGlosadas=${glosadas} &Ano=${ano} &Mes=${mes} &Page=${pagina} &Count=0`,{… Read More How to get statusCode in angular