mirror of
https://github.com/Redocly/redoc.git
synced 2024-09-22 11:48:56 +03:00
28 lines
601 B
JavaScript
28 lines
601 B
JavaScript
|
'use strict';
|
||
|
|
||
|
import {Component, View} from 'angular2/angular2';
|
||
|
import {SchemaManager} from '../../utils/SchemaManager';
|
||
|
import {RedocInfo} from '../RedocInfo/redoc-info'
|
||
|
|
||
|
@Component({
|
||
|
selector: 'redoc',
|
||
|
bindings: [SchemaManager]
|
||
|
})
|
||
|
@View({
|
||
|
templateUrl: './lib/components/Redoc/redoc.html',
|
||
|
directives: [RedocInfo]
|
||
|
})
|
||
|
export class Redoc {
|
||
|
constructor(schemaMgr) {
|
||
|
this.data = null;
|
||
|
this.schema = schemaMgr.schema;
|
||
|
this.extractData();
|
||
|
}
|
||
|
|
||
|
extractData() {
|
||
|
this.data = this.schema
|
||
|
//TODO: check and apply hooks to modify data
|
||
|
}
|
||
|
}
|
||
|
Redoc.parameters = [[SchemaManager]]
|