Commit Graph

56 Commits

Author SHA1 Message Date
Adam Bradley
9f906ae8ae docs(MenuController): update MenuController docs 2016-02-04 20:15:40 -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
Adam Bradley
a42836340a fix(menu): only close when open on enable change 2016-02-04 12:22:09 -06:00
Adam Bradley
72699dbbb4 fix(menu): fix scrolling page w/ side menus
Improved which angles should allow the side menu to open, depending if
it’s a left or right menu. Also check if the distance of the drag is
longer than a side menu would get. For example, scrolling vertically
for a long ways would have a long distance, but triggering a side menu
to open would be a short distance.

Also ensure that a side menu can always be closed incase something goes
wrong.

Closes #5272
2016-02-02 16:41:35 -06:00
mhartington
d8a4ec3893 docs(menu, menuClose, menuToggle): update docs 2016-02-01 16:27:26 -05:00
Adam Bradley
dbc681fb7c docs(): hide methods not requiring docs 2016-01-27 14:27:36 -06:00
Adam Bradley
ee106377fc chore(angular): upgrade to angular 2.0.0-beta.1
Biggest change was that renderer takes  and not just .
2016-01-20 11:15:01 -06:00
Eddie Lau 3dd13
0ef8c78737 add swipeEnabled input to menu to set default swipeable of side menu. add swipeEnable() api to enable disable particular side menu swipeable 2016-01-18 12:29:57 +08:00
Adam Bradley
02626b9489 chore(): add types to Refresher 2016-01-14 21:04:20 -06:00
Tim Lancina
2a2d568162 chore(): fix Menu types 2016-01-13 23:06:13 -06:00
Tim Lancina
c4d59002c0 chore(): fix menu types 2016-01-13 21:03:37 -06:00
Adam Bradley
88aad3f880 refactor(decorators): remove ConfigComponent 2016-01-11 22:51:54 -06:00
Gautier Fauchart
f13eab910c Fix HammerJS Pan config bug 2016-01-10 20:07:34 +00:00
Gautier Fauchart
639dd23a49 make the menu threshold configurable 2016-01-10 00:08:54 +00:00
Adam Bradley
c118009a7c fix(menu): run gestures outside of zone
Closes #755
2015-12-18 10:58: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
Brandy Carney
aeb0bc31ca fix(menu): convert backdrop to class
references #689
2015-12-09 15:05:04 -05:00
Adam Bradley
30b88d746b chore(): add ng prefix to lifecycle interfaces 2015-12-08 21:38:26 -06:00
Drew Rygh
28bb668d43 docs(api): add links to component sections 2015-12-04 13:55:43 -06:00
Adam Bradley
ee094e9d32 fix(menu): auto close menu when disabled, always remove listeners
Closes #674
2015-12-02 14:54:10 -06:00
Adam Bradley
424800a3c9 fix(transition): update disabling transitions 2015-11-24 14:02:40 -06:00
Adam Bradley
5349b3e034 feat(menu): opening event EventEmitter
Closes #632
2015-11-23 20:23:52 -06:00
Adam Bradley
0a1f63d3fb fix(menu): construct menu on first drag
Closes #580
2015-11-19 09:10:39 -06:00
Adam Bradley
13fa14dff6 chore(): make members private 2015-11-15 20:37:24 -06:00
Adam Bradley
877b929a68 fix(menu): rename menu type config
Closes #479
2015-11-10 21:25:14 -06:00
Adam Bradley
d3e9980f9c fix(menu): enabling/disabling 2015-10-31 15:02:59 -05:00
Adam Bradley
2c270b3722 feat(menu): enable/disable side menus 2015-10-31 14:41:27 -05:00
Adam Bradley
36f82b2473 refactor(NavController): restructuring and perf improvements 2015-10-29 14:37:49 -05:00
Max Lynch
196fbe2e01 fix(menu): drag menu to close. Fixes #189 2015-10-29 12:42:18 -05:00
Adam Bradley
bb3b20727c chore(): rename IonicKeyboard to Keyboard 2015-10-16 12:00:46 -05:00
Adam Bradley
1e699ec5ba chore(): rename IonicPlatform to Platform 2015-10-16 11:58:46 -05:00
Adam Bradley
4c53a4b554 chore(): rename IonicConfig to Config 2015-10-16 11:53:11 -05:00
Adam Bradley
03cb1a7a5b refactor(): IonicForm/IonicKeyboard
Closes #224
2015-10-09 11:29:58 -05:00
Adam Bradley
0cac4d9a2e chore(): remove use of @View 2015-10-09 09:15:04 -05:00
Adam Bradley
0be37b201f rename IonicComponent to ConfigComponent 2015-10-07 10:54:28 -05:00
Adam Bradley
9bc09300df chore(): rename properties to inputs, events to outputs 2015-10-06 16:28:32 -05:00
Adam Bradley
c74cab45db Merge branch 'master' into alpha38 2015-10-06 15:31:55 -05:00
Adam Bradley
19b802cb5e chore(menu): better checks for content element
Closes #248
2015-10-06 15:24:57 -05:00
Tim Lancina
9916c187a9 menu api docs 2015-10-05 15:24:48 -05:00
Adam Bradley
97b5142174 fix(menu): backdrop disable-activated 2015-09-28 09:44:11 -05:00
Adam Bradley
1a48cbec96 fix(activator): ensure links active during transition 2015-09-23 20:32:46 -05:00
Adam Bradley
3f7b3aadef fix(menu): do not disable app during menu open/close
Closes #175
2015-09-23 20:02:44 -05:00
Adam Bradley
3a2ffa8362 chore(): rename progressFinish to progressEnd 2015-09-22 16:08:27 -05:00
Adam Bradley
b14956d9d0 chore(): rename annotations to decorators 2015-09-22 13:15:10 -05:00
Adam Bradley
1a60540f2b feat(menu): right side menus 2015-09-22 12:36:42 -05:00