mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 08:20:13 +01:00
empty child component
This commit is contained in:
parent
32f4967d37
commit
0a4cc28447
5 changed files with 76 additions and 7 deletions
|
|
@ -2,12 +2,9 @@ import {Component, ViewEncapsulation} from 'angular2/core';
|
||||||
import {RouteConfig, Router} from 'angular2/router';
|
import {RouteConfig, Router} from 'angular2/router';
|
||||||
|
|
||||||
import {Dashboard} from './dashboard';
|
import {Dashboard} from './dashboard';
|
||||||
|
import {Ui} from './ui';
|
||||||
import {PageTop, Sidebar} from '../theme';
|
import {PageTop, Sidebar} from '../theme';
|
||||||
|
|
||||||
/*
|
|
||||||
* App Component
|
|
||||||
* Top Level Component
|
|
||||||
*/
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'pages',
|
selector: 'pages',
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
|
|
@ -17,20 +14,34 @@ import {PageTop, Sidebar} from '../theme';
|
||||||
})
|
})
|
||||||
@RouteConfig([
|
@RouteConfig([
|
||||||
{
|
{
|
||||||
path: '/dashboard',
|
|
||||||
name: 'Dashboard',
|
name: 'Dashboard',
|
||||||
component: Dashboard,
|
component: Dashboard,
|
||||||
|
path: '/dashboard',
|
||||||
useAsDefault: true,
|
useAsDefault: true,
|
||||||
data: {
|
data: {
|
||||||
title: 'Dashboard',
|
title: 'Dashboard',
|
||||||
selected: true,
|
selected: false,
|
||||||
expanded: true,
|
expanded: false,
|
||||||
sidebarMeta: {
|
sidebarMeta: {
|
||||||
icon: 'ion-android-home',
|
icon: 'ion-android-home',
|
||||||
order: 0,
|
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 {
|
export class Pages {
|
||||||
|
|
||||||
|
|
|
||||||
1
src/app/pages/ui/components/typography/index.ts
Normal file
1
src/app/pages/ui/components/typography/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './typography.component';
|
||||||
|
|
@ -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');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1
src/app/pages/ui/index.ts
Normal file
1
src/app/pages/ui/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './ui.component';
|
||||||
37
src/app/pages/ui/ui.component.ts
Normal file
37
src/app/pages/ui/ui.component.ts
Normal 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() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue