redoc/lib/components/SideMenuCat/side-menu-cat.js

32 lines
735 B
JavaScript
Raw Normal View History

2015-10-15 20:06:16 +03:00
'use strict';
import {RedocComponent, BaseComponent} from '../base';
2015-10-15 21:35:05 +03:00
import {EventEmitter} from 'angular2/angular2';
2015-10-15 20:06:16 +03:00
@RedocComponent({
selector: 'side-menu-cat',
inputs: ['catDetails'],
2015-10-15 21:35:05 +03:00
outputs: ['expand', 'activate'],
2015-10-15 20:06:16 +03:00
styleUrls: ['./lib/components/SideMenuCat/side-menu-cat.css'],
templateUrl: './lib/components/SideMenuCat/side-menu-cat.html'
})
2015-10-27 20:44:08 +03:00
export default class SideMenuCat extends BaseComponent {
2015-10-15 20:06:16 +03:00
constructor(schemaMgr) {
super(schemaMgr);
2015-10-15 21:35:05 +03:00
this.expand = new EventEmitter();
this.activate = new EventEmitter();
}
expandCat() {
this.expand.next();
}
activateMethod(methodIdx) {
this.activate.next({methodIdx: methodIdx});
2015-10-15 20:06:16 +03:00
}
prepareModel() {
this.data = this.catDetails;
}
}