Files
2015-08-28 08:51:14 -05:00

24 lines
416 B
TypeScript

import {Directive} from 'angular2/angular2';
import {IonicApp} from '../app/app';
@Directive({
selector: '[aside-toggle]',
host: {
'(^click)': 'toggle($event)'
}
})
export class AsideToggle {
constructor(app: IonicApp) {
//TODO(mlynch): don't hard code this, evaluate with ref system
this.aside = app.getComponent('menu');
}
toggle(event) {
this.aside && this.aside.toggle();
}
}