mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 03:16:48 +03:00
Run angular in prodMode
This commit is contained in:
parent
fee542d2f4
commit
f608fbb3bd
|
@ -82,9 +82,7 @@ export default class Redoc extends BaseComponent {
|
|||
}
|
||||
|
||||
static init(schemaUrl, options) {
|
||||
var promise = new Promise(function(resolve, reject) {
|
||||
|
||||
SchemaManager.instance().load(schemaUrl)
|
||||
return SchemaManager.instance().load(schemaUrl)
|
||||
.then(() => {
|
||||
(new OptionsManager()).options = options;
|
||||
return bootstrap(Redoc);
|
||||
|
@ -93,18 +91,18 @@ export default class Redoc extends BaseComponent {
|
|||
() => {
|
||||
redocEvents.bootstrapped.next();
|
||||
console.log('ReDoc bootstrapped!');
|
||||
resolve();
|
||||
//resolve();
|
||||
},
|
||||
error => {
|
||||
console.log(error);
|
||||
reject();
|
||||
throw error;
|
||||
}
|
||||
);
|
||||
});
|
||||
return promise;
|
||||
}
|
||||
|
||||
}
|
||||
Redoc.parameters = Redoc.parameters.concat([[OptionsManager], [ElementRef], [BrowserDomAdapter]]);
|
||||
|
||||
// TODO
|
||||
// this doesn't work in side-menu.js because of some circular references issue
|
||||
SideMenu.parameters = SideMenu.parameters.concat([[Redoc]]);
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
import {Redoc} from './components/index';
|
||||
import {enableProdMode} from 'angular2/core';
|
||||
|
||||
export var init = Redoc.init;
|
||||
|
||||
window.Redoc = Redoc;
|
||||
enableProdMode();
|
||||
|
|
Loading…
Reference in New Issue
Block a user