mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
33 lines
530 B
TypeScript
33 lines
530 B
TypeScript
import {Directive} from 'angular2/angular2';
|
|
|
|
import {IonicApp} from '../app/app';
|
|
|
|
/**
|
|
* TODO
|
|
*/
|
|
@Directive({
|
|
selector: '[aside-toggle]',
|
|
host: {
|
|
'(^click)': 'toggle($event)'
|
|
}
|
|
})
|
|
export class AsideToggle {
|
|
/**
|
|
* TODO
|
|
* @param {IonicApp} app TODO
|
|
*/
|
|
constructor(app: IonicApp) {
|
|
//TODO(mlynch): don't hard code this, evaluate with ref system
|
|
this.aside = app.getComponent('menu');
|
|
}
|
|
|
|
/**
|
|
* TODO
|
|
* @param {TODO} event TODO
|
|
*/
|
|
toggle(event) {
|
|
this.aside && this.aside.toggle();
|
|
}
|
|
|
|
}
|