ng-hide expression not working with and and null conditions

Viewed 24

I am trying to implement a statement that will hide the hello world. I have tried adding the expression to a function in typescript but it still would not hide it.

<div ng-hide="textformField.DefaultValueQuery == null && textformField.PlaceHolderQuery == null"> Hello World
</div>
1 Answers

ng-hide is angularjs (1.x) directive, it won;t working with Angular (2+) version. Instead use *ngIf directive. ngIf directive add/remove a DOM from DOM tree when expression evaluated to true/false.

<div *ngIf="textformField.DefaultValueQuery == null && textformField.PlaceHolderQuery == null">
  Hello World
</div>
Related