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

1 Answer

0 votes

An HTML element can be easily hidden using the ng-hide directive in conjunction along with a controller to hide an HTML element on button click.


<div ng-controller="MyController">

  <button ng-click="hide()">Hide element</button>

  <p ng-hide="isHide">Hello World!</p>



controller: function() {

this.isHide = false;

this.hide = function(){

this.isHide = true; }; }

So this brings us to the end of the Angular interview questions article. The topics that you learned in this Angular Interview Questions article are the most sought-after skill sets that recruiters look for in an Angular Professional. These set of Angular Interview Questions will definitely help you ace your job interview. Good luck with your interview!

If you found this “Angular Interview Questions” relevant, check out the Angular Certification Training by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. 

Related questions

0 votes
asked Sep 19 in JavaScript by sharadyadav1986
0 votes
asked Feb 5 in Angular by SakshiSharma