redoc/lib/components/SideMenuCat/side-menu-cat.js
2015-10-27 19:44:08 +02:00

32 lines
735 B
JavaScript

'use strict';
import {RedocComponent, BaseComponent} from '../base';
import {EventEmitter} from 'angular2/angular2';
@RedocComponent({
selector: 'side-menu-cat',
inputs: ['catDetails'],
outputs: ['expand', 'activate'],
styleUrls: ['./lib/components/SideMenuCat/side-menu-cat.css'],
templateUrl: './lib/components/SideMenuCat/side-menu-cat.html'
})
export default class SideMenuCat extends BaseComponent {
constructor(schemaMgr) {
super(schemaMgr);
this.expand = new EventEmitter();
this.activate = new EventEmitter();
}
expandCat() {
this.expand.next();
}
activateMethod(methodIdx) {
this.activate.next({methodIdx: methodIdx});
}
prepareModel() {
this.data = this.catDetails;
}
}