Hi
In below Html i want if value is not null or false in ChildAdopted then it should not be displayed else displayed
Child adopted
Thanks
Hi
In below Html i want if value is not null or false in ChildAdopted then it should not be displayed else displayed
Child adopted
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vishal JoshiPosted Jul 17, 2024, 9:00 AM
Hello Ramco,
You can use ngIf for dynamic conditions to show or hide the content. try the below code.
Thanks
Vishal Joshi
Aman GuptaPosted Jul 17, 2024, 8:15 AM
Hi Ramco,
You can go with below approaches.
Using JavaScript
You can use JavaScript to check the value of ChildAdopted and conditionally display the label.
Using a Templating Engine (e.g., EJS, Handlebars)
If you are using a templating engine, you can conditionally render the label directly in your template.
Example with EJS:
Example with Handlebars:
Using React
If you are using React, you can conditionally render the label in your component.
Choose the method that best fits your setup and project structure.