Issue
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>
Solution
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>
Answered By - Pankaj Parkar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.