Category "angular"

ANGULAR | Use two components with same route

I need to use this route '/', but this route must use a component which is selected after auth validation. I want to do what Facebook does. When you are about t

How can I cast an AbstractControl to a FormControl in a template?

I have a FormGroup that I'm passing from a parent component to a child, and then within that FormGroup there's a control that I'm passing from the first child t

Make proxy configuration works with firebase hosting

I have an angular app with some proxy configuration. proxy.conf.js { "/my-api": { "target": "http://app.myapp.fr", "secure": false, "cha

Controlled input component in Angular 4

Is there any way how to control value of input only by on change handler in angular 4? I would like to achieve the same behaviour as with React's controlled co

ng-bootstrap - ngbtooltip not working with [(ngModel)]

I'm new to angular 4 and bootstrap beta 2 and trying to use ngbtooltip to show tool tip text. Tooltip on the label is working fine when only input does not have

NG0200: Circular dependency in DI detected,Why and How to do?

I want inject ParentCompoent to ChildComponent, But have a error is: Error: NG0200: Circular dependency in DI detected for ParentComponent parent

Unexpected value 'DecoratorFactory' imported by the module 'DynamicTestModule'. Please add a @NgModule annotation

This is my spec file: import { ComponentFixture, TestBed, async } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; im

Angular routerLinkActive only updates after clicking somewhere on the screen

Using Angular 13 I have a side menu which I build like this <mat-nav-list> <a mat-list-item *ngFor="let page of pages" [routerLink]="page.link" route

How fix div which includes span tag for responsive?

I found a neon graphics format and I want to use it. It looks exactly what I want, but not responsive .When it goes into phone mode, the text goes out of the p

Keep prefix even if dropSpecialCharacters is true with ngx-mask

<input matInput prefix="+55" mask=" (00) 00000-0000" [dropSpecialCharacters]="true" type="text" formControlName="phone" name="phone"> With this code I'm

Get the value from the mat-input in angular material

As im new to the angular. I just want to get the value from the mat-input I need to get the value from the angular mat-input. Can someone help me to do this. Th

Check if email is verified in ionic and firebase [closed]

After a user login , I want to check if the email used by the user is verified. I used to do it like this. import * as firebase from 'firebase

How to get query parameters from URL in Angular 5?

I'm using angular 5.0.3, I would like to start my application with a bunch of query parameters like /app?param1=hallo&param2=123. Every tip given in How to

What is purpose of using forRoot in NgModule?

What is the purpose of using forRoot in NgModule? Is it same as the providers in AngularJS 1.x? How does it play the significant role in lazy loading? TIA.

Cannot instantiate cyclic dependency! HttpClient ("[ERROR ->]"): in NgModule AppModule in ./AppModule@-1:-1

I have implemented an interceptor to add authorization header that i can make seucred api. I get an error when i inject this service in any app module // "Cann

angularfire2 transactions and batch writes in firestore

How can I do batch writes/run transactions with firestore in an angular2 app? https://firebase.google.com/docs/firestore/manage-data/transactions If it's poss

Angular 8 - FormArray "No value accessor for form control with path"

I'm using ng-select on a form, but now I want to wrap a specific configuration of this on a custom component. The problem is I'm using a FormArray which contain

Angular 8 - FormArray "No value accessor for form control with path"

I'm using ng-select on a form, but now I want to wrap a specific configuration of this on a custom component. The problem is I'm using a FormArray which contain

In Angular how do I get the ngModuleRef for the module I'm in when I want to dynamically create a component?

Consider a module created like this: @NgModule({ imports: [ BrowserModule ], providers: [ AdService ], declarations: [ AppComponent, AdBannerCompo

Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'

I have a dotnetcore 20 and angular4 project that I am trying to create a userService and get the user to my home component. The backend works just fine but the