How to close the menu dropdown once clicked using typescript. I am able to do using jQuery but I am working on angular 2. I would like to it in typescript
            Asked
            
        
        
            Active
            
        
            Viewed 98 times
        
    0
            
            
        - 
                    https://stackoverflow.com/a/35713421/4248328 – Alive to die - Anant Jun 16 '17 at 04:34
- 
                    Possible duplicate of [Angular2 Close dropdown on click outside, is there an easiest way?](https://stackoverflow.com/questions/35712379/angular2-close-dropdown-on-click-outside-is-there-an-easiest-way) – Alexander Jun 16 '17 at 08:46
2 Answers
0
            
            
        You can use this :
<div (click)='clicked = !clicked'>
  <menu [hidden]='clicked'>
  .......
  </menu>
</div>
 
    
    
        Vivek Doshi
        
- 56,649
- 12
- 110
- 122
0
            
            
        If you are working on ionic 2 then following are the steps to hide menu...
First import Menucontroller from import {MenuController} from 'ionic-angular'; 
In your component constructor include menuController like this : constructor(app: IonicApp, platform: Platform, menu: MenuController)
Then wherever you wish to close menu do this :  this.menu.close();
If you are not using ionic 2 then tell me if u using any plugin in angular for menu? then i can help u with the solution.
Hope this helps..
 
    
    
        Irfan Pathan
        
- 309
- 1
- 3
- 14
 
    