mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-17 07:50:12 +01:00
Added RC4 and beta router
Merge branch 'master' of https://github.com/akveo/ng2-admin # Conflicts: # src/app/theme/components/baSidebar/baSidebar.service.ts
This commit is contained in:
parent
8363102475
commit
1b2d068d46
17 changed files with 207 additions and 222 deletions
17
package.json
17
package.json
|
|
@ -6,15 +6,14 @@
|
||||||
"homepage": "http://akveo.github.io/ng2-admin/",
|
"homepage": "http://akveo.github.io/ng2-admin/",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/common": "2.0.0-rc.4",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0-rc.4",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/core": "2.0.0-rc.4",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/http": "2.0.0-rc.4",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0-rc.4",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
|
||||||
"@angular/platform-server": "2.0.0-rc.3",
|
"@angular/platform-server": "2.0.0-rc.4",
|
||||||
"@angular/router": "3.0.0-alpha.8",
|
"@angular/router": "3.0.0-beta.2",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
|
||||||
"amcharts3": "github:amcharts/amcharts3",
|
"amcharts3": "github:amcharts/amcharts3",
|
||||||
"ammap3": "github:amcharts/ammap3",
|
"ammap3": "github:amcharts/ammap3",
|
||||||
"animate.css": "^3.5.1",
|
"animate.css": "^3.5.1",
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,10 @@
|
||||||
import './app.loader.ts';
|
import "./app.loader.ts";
|
||||||
|
import {Component, ViewEncapsulation} from "@angular/core";
|
||||||
import {Component, ViewEncapsulation} from '@angular/core';
|
import {AppState} from "./app.state";
|
||||||
import {RouteConfig} from '@angular/router-deprecated';
|
import {BaThemeConfigProvider, BaThemeConfig} from "./theme";
|
||||||
|
import {BaThemeRun} from "./theme/directives";
|
||||||
import {Pages} from './pages';
|
import {BaImageLoaderService, BaThemePreloader, BaThemeSpinner} from "./theme/services";
|
||||||
import {Login} from './pages/login';
|
import {layoutPaths} from "./theme/theme.constants";
|
||||||
import {Register} from './pages/register';
|
|
||||||
import {AppState} from './app.state';
|
|
||||||
import {BaThemeConfigProvider, BaThemeConfig} from './theme';
|
|
||||||
import {BaThemeRun} from './theme/directives';
|
|
||||||
import {BaImageLoaderService, BaThemePreloader, BaThemeSpinner} from './theme/services';
|
|
||||||
|
|
||||||
import {layoutPaths} from './theme/theme.constants';
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* App Component
|
* App Component
|
||||||
|
|
@ -31,31 +24,6 @@ import {layoutPaths} from './theme/theme.constants';
|
||||||
</main>
|
</main>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
@RouteConfig([
|
|
||||||
{
|
|
||||||
path: '/pages/...',
|
|
||||||
name: 'Pages',
|
|
||||||
component: Pages,
|
|
||||||
useAsDefault: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/login',
|
|
||||||
name: 'Login',
|
|
||||||
component: Login
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/register',
|
|
||||||
name: 'Register',
|
|
||||||
component: Register
|
|
||||||
},
|
|
||||||
// handle any non-registered route
|
|
||||||
// and simply redirects back to dashboard page
|
|
||||||
// you can specify any customer 404 page while it's not built in ito ng2-admin
|
|
||||||
{
|
|
||||||
path: '/**',
|
|
||||||
redirectTo: ['Pages']
|
|
||||||
}
|
|
||||||
])
|
|
||||||
export class App {
|
export class App {
|
||||||
|
|
||||||
isMenuCollapsed:boolean = false;
|
isMenuCollapsed:boolean = false;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
export const menuItems = [
|
export const menuItems = [
|
||||||
{
|
{
|
||||||
title: 'Dashboard',
|
title: 'Dashboard',
|
||||||
component: 'Dashboard',
|
component: 'dashboard',
|
||||||
icon: 'fa fa-home',
|
icon: 'fa fa-home',
|
||||||
selected: false,
|
selected: false,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
|
|
@ -9,7 +9,7 @@ export const menuItems = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Charts',
|
title: 'Charts',
|
||||||
component: 'Charts',
|
component: 'charts',
|
||||||
icon: 'fa fa-bar-chart',
|
icon: 'fa fa-bar-chart',
|
||||||
selected: false,
|
selected: false,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
|
|
@ -17,13 +17,13 @@ export const menuItems = [
|
||||||
subMenu: [
|
subMenu: [
|
||||||
{
|
{
|
||||||
title: 'Chartist.Js',
|
title: 'Chartist.Js',
|
||||||
component: 'ChartistJs',
|
component: 'chartist-js',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'UI Features',
|
title: 'UI Features',
|
||||||
component: 'Ui',
|
component: 'ui',
|
||||||
icon: 'fa fa-laptop',
|
icon: 'fa fa-laptop',
|
||||||
selected: false,
|
selected: false,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
|
|
@ -31,25 +31,25 @@ export const menuItems = [
|
||||||
subMenu: [
|
subMenu: [
|
||||||
{
|
{
|
||||||
title: 'Typography',
|
title: 'Typography',
|
||||||
component: 'Typography',
|
component: 'typography',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Buttons',
|
title: 'Buttons',
|
||||||
component: 'Buttons',
|
component: 'buttons',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Icons',
|
title: 'Icons',
|
||||||
component: 'Icons',
|
component: 'icons',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Grid',
|
title: 'Grid',
|
||||||
component: 'Grid',
|
component: 'grid',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Form Elements',
|
title: 'Form Elements',
|
||||||
component: 'Forms',
|
component: 'forms',
|
||||||
icon: 'fa fa-pencil-square-o',
|
icon: 'fa fa-pencil-square-o',
|
||||||
selected: false,
|
selected: false,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
|
|
@ -57,17 +57,17 @@ export const menuItems = [
|
||||||
subMenu: [
|
subMenu: [
|
||||||
{
|
{
|
||||||
title: 'Form Inputs',
|
title: 'Form Inputs',
|
||||||
component: 'Inputs',
|
component: 'inputs',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Form Layouts',
|
title: 'Form Layouts',
|
||||||
component: 'Layouts',
|
component: 'layouts',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Tables',
|
title: 'Tables',
|
||||||
component: 'Tables',
|
component: 'tables',
|
||||||
icon: 'fa fa-table',
|
icon: 'fa fa-table',
|
||||||
selected: false,
|
selected: false,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
|
|
@ -75,13 +75,13 @@ export const menuItems = [
|
||||||
subMenu: [
|
subMenu: [
|
||||||
{
|
{
|
||||||
title: 'Basic Tables',
|
title: 'Basic Tables',
|
||||||
component: 'BasicTables',
|
component: 'basictables',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Maps',
|
title: 'Maps',
|
||||||
component: 'Maps',
|
component: 'maps',
|
||||||
icon: 'fa fa-map-marker',
|
icon: 'fa fa-map-marker',
|
||||||
selected: false,
|
selected: false,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
|
|
@ -89,19 +89,19 @@ export const menuItems = [
|
||||||
subMenu: [
|
subMenu: [
|
||||||
{
|
{
|
||||||
title: 'Google Maps',
|
title: 'Google Maps',
|
||||||
component: 'GoogleMaps',
|
component: 'googlemaps',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Leaflet Maps',
|
title: 'Leaflet Maps',
|
||||||
component: 'LeafletMaps',
|
component: 'leafletmaps',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Bubble Maps',
|
title: 'Bubble Maps',
|
||||||
component: 'BubbleMaps',
|
component: 'bubblemaps',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Line Maps',
|
title: 'Line Maps',
|
||||||
component: 'LineMaps',
|
component: 'linemaps',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
19
src/app/app.routes.ts
Normal file
19
src/app/app.routes.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { provideRouter, RouterConfig } from '@angular/router';
|
||||||
|
import {LoginRoutes} from "./pages/login/login.routes";
|
||||||
|
import {PagesRoutes} from "./pages/pages.routes";
|
||||||
|
import {RegisterRoutes} from "./pages/register/register.routes";
|
||||||
|
|
||||||
|
export const routes: RouterConfig = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
redirectTo: '/pages/dashboard',
|
||||||
|
terminal: true
|
||||||
|
},
|
||||||
|
...LoginRoutes,
|
||||||
|
...RegisterRoutes,
|
||||||
|
...PagesRoutes
|
||||||
|
];
|
||||||
|
|
||||||
|
export const APP_ROUTER_PROVIDERS = [
|
||||||
|
provideRouter(routes)
|
||||||
|
];
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from "@angular/core";
|
||||||
import {RouteConfig} from '@angular/router-deprecated';
|
|
||||||
|
|
||||||
// import {ChartJs} from "./components/chartJs";
|
// import {ChartJs} from "./components/chartJs";
|
||||||
import {ChartistJs} from "./components/chartistJs/chartistJs.component";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'maps',
|
selector: 'maps',
|
||||||
|
|
@ -11,19 +9,6 @@ import {ChartistJs} from "./components/chartistJs/chartistJs.component";
|
||||||
styles: [],
|
styles: [],
|
||||||
template: `<router-outlet></router-outlet>`
|
template: `<router-outlet></router-outlet>`
|
||||||
})
|
})
|
||||||
@RouteConfig([
|
|
||||||
{
|
|
||||||
name: 'ChartistJs',
|
|
||||||
component: ChartistJs,
|
|
||||||
path: '/chartist-js',
|
|
||||||
useAsDefault: true,
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// name: 'ChartJs',
|
|
||||||
// component: ChartJs,
|
|
||||||
// path: '/chart-js',
|
|
||||||
// },
|
|
||||||
])
|
|
||||||
export class Charts {
|
export class Charts {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from "@angular/core";
|
||||||
import {RouteConfig} from '@angular/router-deprecated';
|
|
||||||
|
|
||||||
import {Inputs} from './components/inputs';
|
|
||||||
import {Layouts} from './components/layouts';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'forms',
|
selector: 'forms',
|
||||||
|
|
@ -11,19 +7,6 @@ import {Layouts} from './components/layouts';
|
||||||
styles: [],
|
styles: [],
|
||||||
template: `<router-outlet></router-outlet>`
|
template: `<router-outlet></router-outlet>`
|
||||||
})
|
})
|
||||||
@RouteConfig([
|
|
||||||
{
|
|
||||||
name: 'Inputs',
|
|
||||||
component: Inputs,
|
|
||||||
path: '/inputs',
|
|
||||||
useAsDefault: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Layouts',
|
|
||||||
component: Layouts,
|
|
||||||
path: '/layouts',
|
|
||||||
}
|
|
||||||
])
|
|
||||||
export class Forms {
|
export class Forms {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
||||||
14
src/app/pages/login/login.routes.ts
Normal file
14
src/app/pages/login/login.routes.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
import {RouterConfig} from "@angular/router";
|
||||||
|
import {Login} from "./login.component";
|
||||||
|
|
||||||
|
export const LoginRoutes: RouterConfig = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
redirectTo: '/login',
|
||||||
|
terminal: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'login',
|
||||||
|
component: Login
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
@ -1,10 +1,4 @@
|
||||||
import {Component, ViewEncapsulation} from '@angular/core';
|
import {Component} from "@angular/core";
|
||||||
import {RouteConfig} from '@angular/router-deprecated';
|
|
||||||
|
|
||||||
import {GoogleMaps} from './components/googleMaps';
|
|
||||||
import {LeafletMaps} from "./components/leafletMaps";
|
|
||||||
import {BubbleMaps} from "./components/bubbleMaps";
|
|
||||||
import {LineMaps} from "./components/lineMaps";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'maps',
|
selector: 'maps',
|
||||||
|
|
@ -13,29 +7,6 @@ import {LineMaps} from "./components/lineMaps";
|
||||||
styles: [],
|
styles: [],
|
||||||
template: `<router-outlet></router-outlet>`
|
template: `<router-outlet></router-outlet>`
|
||||||
})
|
})
|
||||||
@RouteConfig([
|
|
||||||
{
|
|
||||||
name: 'GoogleMaps',
|
|
||||||
component: GoogleMaps,
|
|
||||||
path: '/google-maps',
|
|
||||||
useAsDefault: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'LeafletMaps',
|
|
||||||
component: LeafletMaps,
|
|
||||||
path: '/leaflet-maps',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'BubbleMaps',
|
|
||||||
component: BubbleMaps,
|
|
||||||
path: '/bubble-maps',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'LineMaps',
|
|
||||||
component: LineMaps,
|
|
||||||
path: '/line-maps',
|
|
||||||
},
|
|
||||||
])
|
|
||||||
export class Maps {
|
export class Maps {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,6 @@
|
||||||
import {Component, ViewEncapsulation} from '@angular/core';
|
import {Component, ViewEncapsulation} from '@angular/core';
|
||||||
import {RouteConfig} from '@angular/router-deprecated';
|
|
||||||
|
|
||||||
import {BaPageTop, BaContentTop, BaSidebar, BaBackTop} from '../theme/components';
|
import {BaPageTop, BaContentTop, BaSidebar, BaBackTop} from '../theme/components';
|
||||||
|
|
||||||
import {Dashboard} from './dashboard';
|
|
||||||
import {Ui} from './ui';
|
|
||||||
import {Maps} from './maps';
|
|
||||||
import {Charts} from './charts';
|
|
||||||
import {Forms} from './forms';
|
|
||||||
import {Tables} from './tables';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'pages',
|
selector: 'pages',
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
|
|
@ -39,39 +30,6 @@ import {Tables} from './tables';
|
||||||
<ba-back-top position="200"></ba-back-top>
|
<ba-back-top position="200"></ba-back-top>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
@RouteConfig([
|
|
||||||
{
|
|
||||||
name: 'Dashboard',
|
|
||||||
component: Dashboard,
|
|
||||||
path: '/dashboard',
|
|
||||||
useAsDefault: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Ui',
|
|
||||||
component: Ui,
|
|
||||||
path: '/ui/...',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Maps',
|
|
||||||
component: Maps,
|
|
||||||
path: '/maps/...',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Charts',
|
|
||||||
component: Charts,
|
|
||||||
path: '/charts/...',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Forms',
|
|
||||||
component: Forms,
|
|
||||||
path: '/forms/...',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Tables',
|
|
||||||
component: Tables,
|
|
||||||
path: '/tables/...',
|
|
||||||
}
|
|
||||||
])
|
|
||||||
export class Pages {
|
export class Pages {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
||||||
114
src/app/pages/pages.routes.ts
Normal file
114
src/app/pages/pages.routes.ts
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
import {RouterConfig} from '@angular/router';
|
||||||
|
import {Dashboard} from "./dashboard/dashboard.component";
|
||||||
|
import {Charts} from "./charts/charts.component";
|
||||||
|
import {ChartistJs} from "./charts/components/chartistJs/chartistJs.component";
|
||||||
|
import {Pages} from "./pages.component";
|
||||||
|
import {Ui} from "./ui/ui.component";
|
||||||
|
import {Typography} from "./ui/components/typography/typography.component";
|
||||||
|
import {Buttons} from "./ui/components/buttons/buttons.component";
|
||||||
|
import {Icons} from "./ui/components/incons/icons.component";
|
||||||
|
import {Grid} from "./ui/components/grid/grid.component";
|
||||||
|
import {Forms} from "./forms/forms.component";
|
||||||
|
import {Inputs} from "./forms/components/inputs/inputs.component";
|
||||||
|
import {Layouts} from "./forms/components/layouts/layouts.component";
|
||||||
|
import {BasicTables} from "./tables/components/basicTables/basicTables.component";
|
||||||
|
import {Tables} from "./tables/tables.component";
|
||||||
|
import {Maps} from "./maps/maps.component";
|
||||||
|
import {GoogleMaps} from "./maps/components/googleMaps/googleMaps.component";
|
||||||
|
import {LeafletMaps} from "./maps/components/leafletMaps/leafletMaps.component";
|
||||||
|
import {BubbleMaps} from "./maps/components/bubbleMaps/bubbleMaps.component";
|
||||||
|
import {LineMaps} from "./maps/components/lineMaps/lineMaps.component";
|
||||||
|
import {Login} from "./login/login.component";
|
||||||
|
import {Register} from "./register/register.component";
|
||||||
|
|
||||||
|
//noinspection TypeScriptValidateTypes
|
||||||
|
export const PagesRoutes:RouterConfig = [
|
||||||
|
{
|
||||||
|
path: 'pages',
|
||||||
|
component: Pages,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'dashboard',
|
||||||
|
component: Dashboard
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'charts',
|
||||||
|
component: Charts,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'chartist-js',
|
||||||
|
component: ChartistJs
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'ui',
|
||||||
|
component: Ui,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'typography',
|
||||||
|
component: Typography
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'buttons',
|
||||||
|
component: Buttons
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'icons',
|
||||||
|
component: Icons
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'grid',
|
||||||
|
component: Grid
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'forms',
|
||||||
|
component: Forms,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'inputs',
|
||||||
|
component: Inputs
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'layouts',
|
||||||
|
component: Layouts
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'tables',
|
||||||
|
component: Tables,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'basictables',
|
||||||
|
component: BasicTables
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'maps',
|
||||||
|
component: Maps,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'googlemaps',
|
||||||
|
component: GoogleMaps
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'leafletmaps',
|
||||||
|
component: LeafletMaps
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'bubblemaps',
|
||||||
|
component: BubbleMaps
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'linemaps',
|
||||||
|
component: LineMaps
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
14
src/app/pages/register/register.routes.ts
Normal file
14
src/app/pages/register/register.routes.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
import {RouterConfig} from "@angular/router";
|
||||||
|
import {Register} from "./register.component";
|
||||||
|
|
||||||
|
export const RegisterRoutes: RouterConfig = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
redirectTo: '/register',
|
||||||
|
terminal: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'register',
|
||||||
|
component: Register
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from "@angular/core";
|
||||||
import {RouteConfig} from '@angular/router-deprecated';
|
|
||||||
|
|
||||||
import {BasicTables} from './components/basicTables';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'forms',
|
selector: 'forms',
|
||||||
|
|
@ -10,14 +7,6 @@ import {BasicTables} from './components/basicTables';
|
||||||
styles: [],
|
styles: [],
|
||||||
template: `<router-outlet></router-outlet>`
|
template: `<router-outlet></router-outlet>`
|
||||||
})
|
})
|
||||||
@RouteConfig([
|
|
||||||
{
|
|
||||||
name: 'BasicTables',
|
|
||||||
component: BasicTables,
|
|
||||||
path: '/basic',
|
|
||||||
useAsDefault: true
|
|
||||||
}
|
|
||||||
])
|
|
||||||
export class Tables {
|
export class Tables {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,4 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from "@angular/core";
|
||||||
import {RouteConfig} from '@angular/router-deprecated';
|
|
||||||
|
|
||||||
import {Typography} from './components/typography';
|
|
||||||
import {Buttons} from './components/buttons';
|
|
||||||
import {Icons} from './components/incons';
|
|
||||||
import {Grid} from './components/grid';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ui',
|
selector: 'ui',
|
||||||
|
|
@ -13,29 +7,6 @@ import {Grid} from './components/grid';
|
||||||
styles: [],
|
styles: [],
|
||||||
template: `<router-outlet></router-outlet>`
|
template: `<router-outlet></router-outlet>`
|
||||||
})
|
})
|
||||||
@RouteConfig([
|
|
||||||
{
|
|
||||||
name: 'Typography',
|
|
||||||
component: Typography,
|
|
||||||
path: '/typography',
|
|
||||||
useAsDefault: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Buttons',
|
|
||||||
component: Buttons,
|
|
||||||
path: '/buttons',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Icons',
|
|
||||||
component: Icons,
|
|
||||||
path: '/icons',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Grid',
|
|
||||||
component: Grid,
|
|
||||||
path: '/grid',
|
|
||||||
}
|
|
||||||
])
|
|
||||||
export class Ui {
|
export class Ui {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import {Component, ElementRef, HostListener, ViewEncapsulation} from '@angular/core';
|
import {Component, ElementRef, HostListener, ViewEncapsulation} from '@angular/core';
|
||||||
import {Router} from '@angular/router-deprecated';
|
import {Router} from '@angular/router';
|
||||||
|
|
||||||
import {AppState} from '../../../app.state';
|
import {AppState} from '../../../app.state';
|
||||||
import {layoutSizes} from '../../../theme';
|
import {layoutSizes} from '../../../theme';
|
||||||
|
|
@ -35,7 +35,7 @@ export class BaSidebar {
|
||||||
private _state:AppState) {
|
private _state:AppState) {
|
||||||
|
|
||||||
this.menuItems = this._sidebarService.getMenuItems();
|
this.menuItems = this._sidebarService.getMenuItems();
|
||||||
this._onRouteChange = this._router.root.subscribe((path) => this._selectMenuItem());
|
// this._onRouteChange = this._router.root.subscribe((path) => this._selectMenuItem());
|
||||||
this._state.subscribe('menu.isCollapsed', (isCollapsed) => {
|
this._state.subscribe('menu.isCollapsed', (isCollapsed) => {
|
||||||
this.isMenuCollapsed = isCollapsed;
|
this.isMenuCollapsed = isCollapsed;
|
||||||
});
|
});
|
||||||
|
|
@ -49,7 +49,7 @@ export class BaSidebar {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnDestroy():void {
|
public ngOnDestroy():void {
|
||||||
this._onRouteChange.unsubscribe();
|
// this._onRouteChange.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngAfterViewInit():void {
|
public ngAfterViewInit():void {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
import {PLATFORM_DIRECTIVES} from '@angular/core';
|
import {PLATFORM_DIRECTIVES} from '@angular/core';
|
||||||
|
|
||||||
// Angular 2 Router
|
// Angular 2 Router
|
||||||
import {ROUTER_DIRECTIVES} from '@angular/router-deprecated';
|
import {ROUTER_DIRECTIVES} from '@angular/router';
|
||||||
|
|
||||||
// application_directives: directives that are global through out the application
|
// application_directives: directives that are global through out the application
|
||||||
export const APPLICATION_DIRECTIVES = [
|
export const APPLICATION_DIRECTIVES = [
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ import {FORM_PROVIDERS, LocationStrategy, HashLocationStrategy} from '@angular/c
|
||||||
|
|
||||||
// Angular 2 Http
|
// Angular 2 Http
|
||||||
import {HTTP_PROVIDERS} from '@angular/http';
|
import {HTTP_PROVIDERS} from '@angular/http';
|
||||||
// Angular 2 Router
|
import {APP_ROUTER_PROVIDERS} from "../../app/app.routes";
|
||||||
import {ROUTER_PROVIDERS} from '@angular/router-deprecated';
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Application Providers/Directives/Pipes
|
* Application Providers/Directives/Pipes
|
||||||
|
|
@ -17,7 +17,7 @@ import {ROUTER_PROVIDERS} from '@angular/router-deprecated';
|
||||||
export const APPLICATION_PROVIDERS = [
|
export const APPLICATION_PROVIDERS = [
|
||||||
...FORM_PROVIDERS,
|
...FORM_PROVIDERS,
|
||||||
...HTTP_PROVIDERS,
|
...HTTP_PROVIDERS,
|
||||||
...ROUTER_PROVIDERS,
|
...APP_ROUTER_PROVIDERS,
|
||||||
{provide: LocationStrategy, useClass: HashLocationStrategy }
|
{provide: LocationStrategy, useClass: HashLocationStrategy }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import '@angular/platform-browser-dynamic';
|
||||||
import '@angular/core';
|
import '@angular/core';
|
||||||
import '@angular/common';
|
import '@angular/common';
|
||||||
import '@angular/http';
|
import '@angular/http';
|
||||||
import '@angular/router-deprecated';
|
import '@angular/router';
|
||||||
|
|
||||||
// RxJS
|
// RxJS
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue