redoc/lib/index.js
2015-10-15 20:06:33 +03:00

23 lines
521 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(Redoc);
}
).then(() => bootstrap(SideMenu))
.then(
() => console.log('ReDoc bootstrapped!'),
error => console.log(error)
);
}
window.Redoc = Redoc;