Commit Graph

22 Commits

Author SHA1 Message Date
Adam Bradley
fc49d1aa29 docs(menu): update menuToggle menuClose docs 2016-02-04 20:32:24 -06:00
Adam Bradley
acf12cdd15 refactor(menu): inject MenuController to control app menus
Menu has been improved to make it easier to open, close, toggle and
enable menus.
Instead of injecting `IonicApp` to find the menu component, you now
inject
`MenuController`.

Was:

```
constructor(app: IonicApp) {
  this.app = app;
}
openMenu() {
  this.app.getComponent('leftMenu').close();
}
```

Now:

To programmatically interact with any menu, you can inject the
`MenuController`
provider into any component or directive. This makes it easy get ahold
of and
control the correct menu instance. By default Ionic will find the app's
menu
without requiring a menu ID. An id attribute on an `<ion-menu>` is only
required
if there are multiple menus on the same side. If there are multiple
menus, but
on different sides, you can use the name of the side to get the correct
menu

If there's only one menu:

```
constructor(menu: MenuController) {
  this.menu = menu;
}
openMenu() {
  this.menu.close();
}
```

If there is a menu on the left and right side:

```
toggleMenu() {
  this.menu.toggle('left');
}
```

If there are multiple menus on the same side:

```
<ion-menu id="myMenuId" side="left">...</ion-menu>
<ion-menu id="otherMenuId" side="left">...</ion-menu>

closeMenu() {
  this.menu.close('myMenuId');
}
```
2016-02-04 16:47:05 -06:00
mhartington
d8a4ec3893 docs(menu, menuClose, menuToggle): update docs 2016-02-01 16:27:26 -05:00
Adam Bradley
146cb06df2 chore(): add types to menu-toggle 2016-01-14 20:09:08 -06:00
mhartington
7138e61e2d docs()menus 2015-12-16 17:05:21 -05:00
Drew Rygh
068f3ceb29 Merge remote-tracking branch 'origin/master' into WIP-api-demos 2015-12-16 11:13:03 -06:00
Drew Rygh
520942f697 docs(menu): link to api demo 2015-12-14 08:14:05 -06:00
Adam Bradley
5d6d9b9610 chore(upgrad): ng alpha52 and case-sensitive templates 2015-12-10 22:52:55 -06:00
Tim Lancina
d464d5cb1c remove angular2/angular2 imports 2015-12-10 16:41:57 -06:00
Adam Bradley
1799d1f421 feat(menu): give menu's unique ids 2015-12-09 21:10:13 -06:00
Adam Bradley
ce2e4a3e32 fix back button, add deprecation warnings 2015-12-08 15:48:40 -06:00
Drew Rygh
28bb668d43 docs(api): add links to component sections 2015-12-04 13:55:43 -06:00
Adam Bradley
c19fcd5bed chore(navbar): rename nav-bar files to navbar 2015-11-02 16:52:52 -06:00
Adam Bradley
2c270b3722 feat(menu): enable/disable side menus 2015-10-31 14:41:27 -05:00
Adam Bradley
9bc09300df chore(): rename properties to inputs, events to outputs 2015-10-06 16:28:32 -05:00
Adam Bradley
52bf1f8520 fix(menuClose): put in ionic directives 2015-09-29 11:45:44 -05:00
Adam Bradley
89c0a0ef09 refactor(): rename ViewController/ViewItem
Rename ViewController to NavController, ViewItem to ViewController
2015-09-23 16:57:25 -05:00
Adam Bradley
abff83a206 toolbar refactor wip 2015-09-16 00:42:22 -05:00
Adam Bradley
e741608f05 hide toolbar menu-toggle when not the root 2015-09-15 14:51:03 -05:00
Adam Bradley
f7a3a2436b menu-toggle updates 2015-09-13 19:43:35 -05:00
Adam Bradley
60f7bd548b toolbar menu-toggle to use link 2015-09-13 18:40:20 -05:00
Adam Bradley
0039647515 rename aside to menu 2015-09-11 21:40:58 -05:00