mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-02-26 09:54:11 +01:00
Merge branch 'develop/router'
Conflicts: src/platform/browser/directives.ts src/platform/browser/providers.ts
This commit is contained in:
commit
660aa8a4b6
33 changed files with 616 additions and 550 deletions
|
|
@ -1,8 +1,6 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {RouteConfig} from '@angular/router-deprecated';
|
||||
import {Component} from "@angular/core";
|
||||
|
||||
// import {ChartJs} from "./components/chartJs";
|
||||
import {ChartistJs} from "./components/chartistJs/chartistJs.component";
|
||||
|
||||
@Component({
|
||||
selector: 'maps',
|
||||
|
|
@ -11,19 +9,6 @@ import {ChartistJs} from "./components/chartistJs/chartistJs.component";
|
|||
styles: [],
|
||||
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 {
|
||||
|
||||
constructor() {
|
||||
|
|
|
|||
|
|
@ -1,21 +1,9 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {RouteConfig} from '@angular/router-deprecated';
|
||||
|
||||
import {Ckeditor} from "./components/ckeditor";
|
||||
|
||||
@Component({
|
||||
selector: 'editors',
|
||||
template: `<router-outlet></router-outlet>`
|
||||
})
|
||||
|
||||
@RouteConfig([
|
||||
{
|
||||
name: 'Ckeditor',
|
||||
component: Ckeditor,
|
||||
path: '/ckeditor',
|
||||
useAsDefault: true
|
||||
}
|
||||
])
|
||||
export class Editors {
|
||||
constructor() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {RouteConfig} from '@angular/router-deprecated';
|
||||
|
||||
import {Inputs} from './components/inputs';
|
||||
import {Layouts} from './components/layouts';
|
||||
|
||||
@Component({
|
||||
selector: 'forms',
|
||||
|
|
@ -11,19 +7,6 @@ import {Layouts} from './components/layouts';
|
|||
styles: [],
|
||||
template: `<router-outlet></router-outlet>`
|
||||
})
|
||||
@RouteConfig([
|
||||
{
|
||||
name: 'Inputs',
|
||||
component: Inputs,
|
||||
path: '/inputs',
|
||||
useAsDefault: true
|
||||
},
|
||||
{
|
||||
name: 'Layouts',
|
||||
component: Layouts,
|
||||
path: '/layouts',
|
||||
}
|
||||
])
|
||||
export class Forms {
|
||||
|
||||
constructor() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="auth-main">
|
||||
<div class="auth-block">
|
||||
<h1>Sign in to ng2-admin</h1>
|
||||
<a [routerLink]="['Register']" class="auth-link">New to ng2-admin? Sign up!</a>
|
||||
<a [routerLink]="['/register']" class="auth-link">New to ng2-admin? Sign up!</a>
|
||||
|
||||
<form [formGroup]="form" (ngSubmit)="onSubmit(form.value)" class="form-horizontal">
|
||||
<div class="form-group row" [ngClass]="{'has-error': (!email.valid && email.touched), 'has-success': (email.valid && email.touched)}">
|
||||
|
|
|
|||
10
src/app/pages/login/login.routes.ts
Normal file
10
src/app/pages/login/login.routes.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import {RouterConfig} from '@angular/router';
|
||||
import {Login} from './login.component';
|
||||
|
||||
//noinspection TypeScriptValidateTypes
|
||||
export const LoginRoutes: RouterConfig = [
|
||||
{
|
||||
path: 'login',
|
||||
component: Login
|
||||
}
|
||||
];
|
||||
|
|
@ -1,10 +1,4 @@
|
|||
import {Component, ViewEncapsulation} 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";
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'maps',
|
||||
|
|
@ -13,29 +7,6 @@ import {LineMaps} from "./components/lineMaps";
|
|||
styles: [],
|
||||
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 {
|
||||
|
||||
constructor() {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
import {Component, ViewEncapsulation} from '@angular/core';
|
||||
import {RouteConfig} from '@angular/router-deprecated';
|
||||
|
||||
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';
|
||||
import {Editors} from "./editors";
|
||||
|
||||
@Component({
|
||||
selector: 'pages',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
|
@ -40,44 +30,6 @@ import {Editors} from "./editors";
|
|||
<ba-back-top position="200"></ba-back-top>
|
||||
`
|
||||
})
|
||||
@RouteConfig([
|
||||
{
|
||||
name: 'Editors',
|
||||
component: Editors,
|
||||
path: '/editors/...',
|
||||
},
|
||||
{
|
||||
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 {
|
||||
|
||||
constructor() {
|
||||
|
|
|
|||
307
src/app/pages/pages.routes.ts
Normal file
307
src/app/pages/pages.routes.ts
Normal file
|
|
@ -0,0 +1,307 @@
|
|||
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 {Editors} from './editors/editors.component';
|
||||
import {Ckeditor} from './editors/components/ckeditor/ckeditor.component';
|
||||
|
||||
//noinspection TypeScriptValidateTypes
|
||||
export const PagesRoutes:RouterConfig = [
|
||||
{
|
||||
path: 'pages',
|
||||
component: Pages,
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: Dashboard,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Dashboard',
|
||||
icon: 'ion-android-home',
|
||||
selected: false,
|
||||
expanded: false,
|
||||
order: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'editors',
|
||||
component: Editors,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Editors',
|
||||
icon: 'ion-edit',
|
||||
selected: false,
|
||||
expanded: false,
|
||||
order: 100,
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'ckeditor',
|
||||
component: Ckeditor,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'CKEditor',
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'charts',
|
||||
component: Charts,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Charts',
|
||||
icon: 'ion-stats-bars',
|
||||
selected: false,
|
||||
expanded: false,
|
||||
order: 200,
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'chartist-js',
|
||||
component: ChartistJs,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Chartist.Js',
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'ui',
|
||||
component: Ui,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'UI Features',
|
||||
icon: 'ion-android-laptop',
|
||||
selected: false,
|
||||
expanded: false,
|
||||
order: 300,
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'typography',
|
||||
component: Typography,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Typography',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'buttons',
|
||||
component: Buttons,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Buttons',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'icons',
|
||||
component: Icons,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Icons',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'grid',
|
||||
component: Grid,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Grid',
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'forms',
|
||||
component: Forms,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Form Elements',
|
||||
icon: 'ion-compose',
|
||||
selected: false,
|
||||
expanded: false,
|
||||
order: 400,
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'inputs',
|
||||
component: Inputs,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Form Inputs',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'layouts',
|
||||
component: Layouts,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Form Layouts',
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'tables',
|
||||
component: Tables,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Tables',
|
||||
icon: 'ion-grid',
|
||||
selected: false,
|
||||
expanded: false,
|
||||
order: 500,
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'basictables',
|
||||
component: BasicTables,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Basic Tables',
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'maps',
|
||||
component: Maps,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Maps',
|
||||
icon: 'ion-ios-location-outline',
|
||||
selected: false,
|
||||
expanded: false,
|
||||
order: 600,
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'googlemaps',
|
||||
component: GoogleMaps,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Google Maps',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'leafletmaps',
|
||||
component: LeafletMaps,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Leaflet Maps',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'bubblemaps',
|
||||
component: BubbleMaps,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Bubble Maps',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'linemaps',
|
||||
component: LineMaps,
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Line Maps',
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Menu Level 1',
|
||||
icon: 'ion-ios-more',
|
||||
selected: false,
|
||||
expanded: false,
|
||||
order: 700,
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Menu Level 1.1',
|
||||
url: '#'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Menu Level 1.2',
|
||||
url: '#'
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
data: {
|
||||
menu: {
|
||||
title: 'Menu Level 1.2.1',
|
||||
url: '#'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
data: {
|
||||
menu: {
|
||||
title: 'External Link',
|
||||
url: 'http://akveo.com',
|
||||
icon: 'ion-android-exit',
|
||||
order: 800,
|
||||
target: '_blank'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="auth-main">
|
||||
<div class="auth-block">
|
||||
<h1>Sign up to ng2-admin</h1>
|
||||
<a [routerLink]="['Login']" class="auth-link">Already have an ng2-admin account? Sign in!</a>
|
||||
<a [routerLink]="['/login']" class="auth-link">Already have an ng2-admin account? Sign in!</a>
|
||||
|
||||
<form [formGroup]="form" (ngSubmit)="onSubmit(form.value)" class="form-horizontal">
|
||||
<div class="form-group row" [ngClass]="{'has-error': (!name.valid && name.touched), 'has-success': (name.valid && name.touched)}">
|
||||
|
|
|
|||
10
src/app/pages/register/register.routes.ts
Normal file
10
src/app/pages/register/register.routes.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import {RouterConfig} from '@angular/router';
|
||||
import {Register} from './register.component';
|
||||
|
||||
//noinspection TypeScriptValidateTypes
|
||||
export const RegisterRoutes: RouterConfig = [
|
||||
{
|
||||
path: 'register',
|
||||
component: Register
|
||||
}
|
||||
];
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {RouteConfig} from '@angular/router-deprecated';
|
||||
|
||||
import {BasicTables} from './components/basicTables';
|
||||
|
||||
@Component({
|
||||
selector: 'forms',
|
||||
|
|
@ -10,14 +7,6 @@ import {BasicTables} from './components/basicTables';
|
|||
styles: [],
|
||||
template: `<router-outlet></router-outlet>`
|
||||
})
|
||||
@RouteConfig([
|
||||
{
|
||||
name: 'BasicTables',
|
||||
component: BasicTables,
|
||||
path: '/basic',
|
||||
useAsDefault: true
|
||||
}
|
||||
])
|
||||
export class Tables {
|
||||
|
||||
constructor() {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,4 @@
|
|||
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({
|
||||
selector: 'ui',
|
||||
|
|
@ -13,29 +7,6 @@ import {Grid} from './components/grid';
|
|||
styles: [],
|
||||
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 {
|
||||
|
||||
constructor() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue