mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-10 19:06:34 +03:00
Move side menu into root tree
This commit is contained in:
parent
7c21271c3e
commit
77a9b4e1dc
|
@ -12,8 +12,6 @@
|
||||||
<button id="load-button"> Explore </button>
|
<button id="load-button"> Explore </button>
|
||||||
</nav>
|
</nav>
|
||||||
</nav>
|
</nav>
|
||||||
<side-menu>
|
|
||||||
</side-menu>
|
|
||||||
<!-- The wrapper component -->
|
<!-- The wrapper component -->
|
||||||
<redoc>
|
<redoc>
|
||||||
Loading...
|
Loading...
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
<side-menu> </side-menu>
|
||||||
<api-info> </api-info>
|
<api-info> </api-info>
|
||||||
<methods-list> </methods-list>
|
<methods-list> </methods-list>
|
||||||
|
|
|
@ -4,12 +4,13 @@ import {RedocComponent, BaseComponent} from '../base';
|
||||||
import SchemaManager from '../../utils/SchemaManager';
|
import SchemaManager from '../../utils/SchemaManager';
|
||||||
import ApiInfo from '../ApiInfo/api-info';
|
import ApiInfo from '../ApiInfo/api-info';
|
||||||
import MethodsList from '../MethodsList/methods-list';
|
import MethodsList from '../MethodsList/methods-list';
|
||||||
|
import SideMenu from '../SideMenu/side-menu';
|
||||||
|
|
||||||
@RedocComponent({
|
@RedocComponent({
|
||||||
selector: 'redoc',
|
selector: 'redoc',
|
||||||
providers: [SchemaManager],
|
providers: [SchemaManager],
|
||||||
templateUrl: './lib/components/Redoc/redoc.html',
|
templateUrl: './lib/components/Redoc/redoc.html',
|
||||||
directives: [ApiInfo, MethodsList]
|
directives: [ApiInfo, MethodsList, SideMenu]
|
||||||
})
|
})
|
||||||
export default class Redoc extends BaseComponent {
|
export default class Redoc extends BaseComponent {
|
||||||
constructor(schemaMgr) {
|
constructor(schemaMgr) {
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import {bootstrap} from 'angular2/angular2';
|
import {bootstrap} from 'angular2/angular2';
|
||||||
import {Redoc, SideMenu} from './components/index';
|
import {Redoc} from './components/index';
|
||||||
import SchemaManager from './utils/SchemaManager';
|
import SchemaManager from './utils/SchemaManager';
|
||||||
|
|
||||||
export * from './components/index';
|
export * from './components/index';
|
||||||
|
|
||||||
export function init(schemaUrl) {
|
export function init(schemaUrl) {
|
||||||
SchemaManager.instance().load(schemaUrl).then(
|
SchemaManager.instance().load(schemaUrl)
|
||||||
() => {
|
.then(() => bootstrap(Redoc))
|
||||||
return bootstrap(SideMenu);
|
|
||||||
}
|
|
||||||
).then(() => bootstrap(Redoc))
|
|
||||||
.then(
|
.then(
|
||||||
() => console.log('ReDoc bootstrapped!'),
|
() => console.log('ReDoc bootstrapped!'),
|
||||||
error => console.log(error)
|
error => console.log(error)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user