How can you hide an html element just by a button click in angular?



How can you hide an html element just by a button click in angular?..

Answer / Deepak Kumar Meena

You can hide an HTML element in Angular by using data binding to bind the visibility of the element to a variable in your controller. When the variable is set to `false`, the element will not be displayed, and when it is set to `true`, it will be displayed again. You can toggle the variable value using the click event of a button or any other interactive element. Here's an example:

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

What is an angular 2 component?

1 Answers  


What is spa in angularjs?

1 Answers  


How to append base url to http requests in angular?

1 Answers  


When to use factory?

1 Answers  


What is typescript ?

1 Answers  


What are services in angularjs?

1 Answers  


Explain the difference between promise and observable in angular?

1 Answers  


What is $ digest?

1 Answers  


What is scope in angular?

1 Answers  


Explain currency filter in angularjs. How can we use it?

1 Answers  


What is cross site script inclusion (xssi)?

1 Answers  


Write command to generate a component in specific module in angular cli?

1 Answers  


Categories