mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-25 18:13:44 +03:00
23 lines
514 B
JavaScript
23 lines
514 B
JavaScript
'use strict';
|
|
|
|
import 'reflect-metadata';
|
|
import {bootstrap} from 'angular2/angular2';
|
|
import {Redoc, SideMenu} from './components/index';
|
|
import SchemaManager from './utils/SchemaManager';
|
|
|
|
export * from './components/index';
|
|
|
|
export function init(schemaUrl) {
|
|
SchemaManager.instance().load(schemaUrl).then(
|
|
() => {
|
|
return bootstrap(SideMenu);
|
|
}
|
|
).then(() => bootstrap(Redoc))
|
|
.then(
|
|
() => console.log('ReDoc bootstrapped!'),
|
|
error => console.log(error)
|
|
);
|
|
}
|
|
|
|
window.Redoc = Redoc;
|