Move side menu into root tree

This commit is contained in:
Roman Hotsiy 2015-11-16 01:10:04 +02:00
parent 7c21271c3e
commit 77a9b4e1dc
4 changed files with 6 additions and 9 deletions

View File

@ -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...

View File

@ -1,2 +1,3 @@
<side-menu> </side-menu>
<api-info> </api-info> <api-info> </api-info>
<methods-list> </methods-list> <methods-list> </methods-list>

View File

@ -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) {

View File

@ -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)