Top "Angular" questions

Questions about Angular (not to be confused with AngularJS), the web framework from Google.

Can't bind to 'ngModel' since it isn't a known property of 'input'

I've got the following error when launching my Angular app, even if the component is not displayed. I have to …

javascript angular typescript input
ngFor with index as value in attribute

I have a simple ngFor loop which also keeps track of the current index. I want to store that index …

angular ngfor
Could not find module "@angular-devkit/build-angular"

After updating to Angular 6.0.1, I get the following error on ng serve: Could not find module "@angular-devkit/build-angular" from "/home/…

angular angular-cli angular6 angular-cli-v6
Angular: conditional class with *ngClass

What is wrong with my Angular code? I am getting: Cannot read property 'remove' of undefined at BrowserDomAdapter.removeClass ... HTML &…

javascript css angular angular-template angular-ng-class
How to use *ngIf else?

I'm using Angular and I want to use *ngIf else (available since version 4) in this example: <div *ngIf="isValid"&…

angular if-statement angular-template
Can't bind to 'formGroup' since it isn't a known property of 'form'

THE SITUATION: Please help! I am trying to make what should be a very simple form in my Angular2 app …

angular typescript angular2-forms
How to get current route

The current docs only talk about getting route params, not the actual route segments. For example, if i want to …

angular angular2-routing
What is the equivalent of ngShow and ngHide in Angular 2+?

I have a number of elements that I want to be visible under certain conditions. In AngularJS I would write &…

angular angular-components angular-template
How can I select an element in a component template?

Does anybody know how to get hold of an element defined in a component template? Polymer makes it really easy …

angular typescript angular-components
Format date as dd/MM/yyyy using pipes

I'm using the date pipe to format my date, but I just can't get the exact format I want without …

date angular angular-pipe date-pipe