Top "Angular-ng-if" questions

An Angular core directive that toggles the presence of the targeted element in the DOM.

*ngIf not working as expected with observable

So I have these 2 buttons: <a class="router-link nav-item" routerLink="/login" *ngIf="!isLoggedIn$ | async"> Login </a> &…

angular angular-ng-if
Can't have event on ng-template? Event binding click not emitted by any directive on an embedded template

I am trying to simply use *ngIf ;else to render a button or not but keep getting this error. It …

angular angular-ng-if
Angular: using both *ngFor and *ngIf with reference to index value in child elements

I would like to render objects from array observable in some grid-car components. In addition, I want to limit the …

angular ngfor angular-ng-if
Angular2 check if object has peoperty inside *ngIf

export interface Element { name: string; } export class Room implements Element { name: string; type:string } export class Hall implements Element { name: …

angular typescript angular2-components angular-ng-if
Angular 2, using ngClass with conditionals in ngFor

I have ngFor loop that displays data, and based on if something is true or false in that loop, how …

angular angular-ng-if
ng-else directive in angularjs

how can we create ngELSE directive as same as ngIF directive? below code for ngIfDirective. Shall we customize the code …

javascript angularjs angular-ng-if
Hide / show with *ngIf Angular2

I have two elements which I want to hide and show based on *ngIf condition value. By default my wrap …

angular event-binding angular-ng-if
Angular ng-show if string not empty does not work

I am writing a web app using AngularJS. The user submits up to 3 keywords to the server. I would like …

angularjs angularjs-ng-repeat ng-show angular-ng-if angularjs-ng-show
Is there elseIf in Angular 4

I have a number of statements <ng-template [ngIf]="xyz== 1">First</ng-template> <ng-template [ngIf]="pqr == 2">…

angular angular-ng-if
AngularJS - Hiding value based on null and empty array

I am trying to perform an ng-hide when a value is either null or an empty array (in Firebug, this …

angularjs angularjs-scope ng-show angular-ng-if ng-hide