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

32 lines
727 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'
})
export class SideMenuCat extends BaseComponent {
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;
}
}