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>
</nav>
</nav>
<side-menu>
</side-menu>
<!-- The wrapper component -->
<redoc>
Loading...

View File

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

View File

@ -4,12 +4,13 @@ import {RedocComponent, BaseComponent} from '../base';
import SchemaManager from '../../utils/SchemaManager';
import ApiInfo from '../ApiInfo/api-info';
import MethodsList from '../MethodsList/methods-list';
import SideMenu from '../SideMenu/side-menu';
@RedocComponent({
selector: 'redoc',
providers: [SchemaManager],
templateUrl: './lib/components/Redoc/redoc.html',
directives: [ApiInfo, MethodsList]
directives: [ApiInfo, MethodsList, SideMenu]
})
export default class Redoc extends BaseComponent {
constructor(schemaMgr) {

View File

@ -1,17 +1,14 @@
'use strict';
import {bootstrap} from 'angular2/angular2';
import {Redoc, SideMenu} from './components/index';
import {Redoc} from './components/index';
import SchemaManager from './utils/SchemaManager';
export * from './components/index';
export function init(schemaUrl) {
SchemaManager.instance().load(schemaUrl).then(
() => {
return bootstrap(SideMenu);
}
).then(() => bootstrap(Redoc))
SchemaManager.instance().load(schemaUrl)
.then(() => bootstrap(Redoc))
.then(
() => console.log('ReDoc bootstrapped!'),
error => console.log(error)