mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 11:26:37 +03:00
32 lines
735 B
JavaScript
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;
|
|
}
|
|
}
|