When a user clicks on an icon, I want to display a drop-down menu. I attempted to use the ng-show
directive for this purpose, but unfortunately, the drop-down menu is not appearing.
- I created an icon
...
, and when clicked, I attempted to open the drop-down menu using ng-show. However, it is not displaying as expected. Why could this be happening?
Below is the code snippet:
http://codepen.io/naveennsit/pen/pbPJEN
$scope.showDropDown=function(e){
alert('show drop down');
$scope.showDropDown=true;
e.stopPropagation();
}
HTML
<ul class="dropdown-menu" ng-show='showDropDown'>
<li><a href="#">Edit</a></li>
<li><a href="#">Delete</a></li>
</ul>