Questions tagged [angular-ng-if]

An Angular core directive that toggles the presence of the targeted element in the DOM. Do not use this tag for the ng-if directive in the older AngularJS version.

ngIf is an Angular directive that alters the targeted element.

From the docs:

Conditionally includes a template based on the value of an expression.

1085 questions
-3
votes
2 answers

Angular 4+ : Why isn't ng-if working in app.componet.html?

I am currently trying to use an ng-if directive in my app.component.html file:

This should appear.

This shouldn't, but it does.

My app.component.ts file looks like this: import { Component } from…
-3
votes
1 answer

using *ngIf to display a form

how can I fix this problem Error: Uncaught (in promise): TypeError: __webpack_require__.e is not a function message: "Uncaught (in promise): TypeError: __webpack_require__.e is not a function TypeError: __webpack_require__.e is not a function
etah jet
  • 169
  • 1
  • 7
-3
votes
1 answer

Angular5 *ngIf=“afunctioncall(); let L” results in the function being called 4 times

I am working with Angular 5 and I want an element to return an object after finding from an array upon the result of a function call and then I use let L as a variable object to hold that. When I do this I've noticed that the function is called…
Umer MehAr
  • 357
  • 1
  • 5
  • 16
-3
votes
2 answers

Can't bind to 'ngIf'

Can't bind to ngIf since it isn't a known property
rajeev tejapuriya
  • 125
  • 1
  • 2
  • 11
-4
votes
2 answers

Why this *ngIf not render my paragraph checking the value of a variable?

I am working on an Angular application and I am finding the following problem using *ngIf directive. Into my HTML code I have put:

{{selectedAssetType}}

TEST

As you can see first I am printing the…
AndreaNobili
  • 34,200
  • 85
  • 240
  • 456
1 2 3
72
73