empty child component

This commit is contained in:
nixa 2016-04-29 20:07:25 +03:00
parent 32f4967d37
commit 0a4cc28447
5 changed files with 76 additions and 7 deletions

View file

@ -2,12 +2,9 @@ import {Component, ViewEncapsulation} from 'angular2/core';
import {RouteConfig, Router} from 'angular2/router';
import {Dashboard} from './dashboard';
import {Ui} from './ui';
import {PageTop, Sidebar} from '../theme';
/*
* App Component
* Top Level Component
*/
@Component({
selector: 'pages',
encapsulation: ViewEncapsulation.None,
@ -17,20 +14,34 @@ import {PageTop, Sidebar} from '../theme';
})
@RouteConfig([
{
path: '/dashboard',
name: 'Dashboard',
component: Dashboard,
path: '/dashboard',
useAsDefault: true,
data: {
title: 'Dashboard',
selected: true,
expanded: true,
selected: false,
expanded: false,
sidebarMeta: {
icon: 'ion-android-home',
order: 0,
}
}
},
{
name: 'Ui',
component: Ui,
path: '/ui/...',
data: {
title: 'UI Features',
selected: false,
expanded: false,
sidebarMeta: {
icon: 'ion-android-laptop',
order: 200,
}
}
},
])
export class Pages {

View file

@ -0,0 +1 @@
export * from './typography.component';

View file

@ -0,0 +1,19 @@
import {Component, ViewEncapsulation} from 'angular2/core';
@Component({
selector: 'typography',
pipes: [],
providers: [],
styles: [],
template: 'typography'
})
export class Typography {
constructor() {
}
ngOnInit() {
console.log('typography');
}
}

View file

@ -0,0 +1 @@
export * from './ui.component';

View file

@ -0,0 +1,37 @@
import {Component, ViewEncapsulation} from 'angular2/core';
import {RouteConfig} from 'angular2/router';
import {Typography} from './components/typography';
@Component({
selector: 'ui',
pipes: [],
providers: [],
styles: [],
template: `<router-outlet></router-outlet>`
})
@RouteConfig([
{
name: 'Typography',
component: Typography,
path: '/typography',
useAsDefault: true,
data: {
title: 'Typography',
selected: false,
expanded: false,
sidebarMeta: {
order: 0,
}
}
},
])
export class Ui {
constructor() {
}
ngOnInit() {
}
}