2015-10-03 15:11:57 +03:00
|
|
|
'use strict';
|
|
|
|
|
2015-10-03 11:54:09 +03:00
|
|
|
import 'reflect-metadata';
|
|
|
|
import { bootstrap } from 'angular2/angular2';
|
2015-10-15 20:06:33 +03:00
|
|
|
import { Redoc, SideMenu } from './components/index';
|
2015-10-07 12:47:57 +03:00
|
|
|
import { SchemaManager} from './utils/SchemaManager';
|
2015-10-03 11:54:09 +03:00
|
|
|
|
2015-10-07 12:47:57 +03:00
|
|
|
export * from './components/index';
|
2015-10-03 11:54:09 +03:00
|
|
|
|
2015-10-07 12:47:57 +03:00
|
|
|
export function init(schemaUrl) {
|
|
|
|
SchemaManager.instance().load(schemaUrl).then(
|
|
|
|
() => {
|
|
|
|
return bootstrap(Redoc);
|
|
|
|
}
|
2015-10-15 20:06:33 +03:00
|
|
|
).then(() => bootstrap(SideMenu))
|
|
|
|
.then(
|
2015-10-03 11:54:09 +03:00
|
|
|
() => console.log('ReDoc bootstrapped!'),
|
|
|
|
error => console.log(error)
|
|
|
|
);
|
|
|
|
}
|
2015-10-15 20:06:33 +03:00
|
|
|
|
|
|
|
window.Redoc = Redoc;
|