0

Attempting to hide the img using the ng-show directive. Code shown

No hiding, even with false condition.

Wasif Khan
  • 956
  • 7
  • 25

1 Answers1

1

Try using:

[hidded]="true"

or

*ngIf="false"
  • He is using angular1 not angular2. – Wasif Khan Dec 12 '17 at 06:22
  • But the code seems to be of Angular2 with typescript file. Sorry for the misconception. – Shiha Mohan Dec 12 '17 at 06:26
  • Are you able to clarify why *ngIf="false" works and not ng-if = "false"? Is there a reference of the 'correct' formatting of directives that I seem to be missing? – Nathan Devery Dec 12 '17 at 06:27
  • I'm confused why references such as https://www.w3schools.com/angular/ng_ng-if.asp state it should be formatted as 'ng-if', but only '*ngIf' works? – Nathan Devery Dec 12 '17 at 06:32
  • @NathanDevery Please refer this: https://angular.io/api/common/NgIf , http://jilles.me/ng-click-and-ng-if-in-angular2/ – Shiha Mohan Dec 12 '17 at 06:32
  • Sorry my bad, Shiha Mohan. He indeed is using Angular2. You got the problem what you were doing? you were using angular1, ng-if in angular2 :P – Wasif Khan Dec 12 '17 at 06:34