From 693b1aba4675f7e3d850e0f6d07dbfc7bdff9b8c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 20 Nov 2016 17:18:15 +0100 Subject: Client: split in angular modules --- client/src/app/login/index.ts | 3 ++- client/src/app/login/login-routing.module.ts | 22 ++++++++++++++++++++++ client/src/app/login/login.component.ts | 3 ++- client/src/app/login/login.module.ts | 24 ++++++++++++++++++++++++ client/src/app/login/login.routes.ts | 13 ------------- 5 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 client/src/app/login/login-routing.module.ts create mode 100644 client/src/app/login/login.module.ts delete mode 100644 client/src/app/login/login.routes.ts (limited to 'client/src/app/login') diff --git a/client/src/app/login/index.ts b/client/src/app/login/index.ts index 64d3f2a3c..5639915f7 100644 --- a/client/src/app/login/index.ts +++ b/client/src/app/login/index.ts @@ -1,2 +1,3 @@ +export * from './login-routing.module'; export * from './login.component'; -export * from './login.routes'; +export * from './login.module'; diff --git a/client/src/app/login/login-routing.module.ts b/client/src/app/login/login-routing.module.ts new file mode 100644 index 000000000..da68519bd --- /dev/null +++ b/client/src/app/login/login-routing.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +import { LoginComponent } from './login.component'; + +const loginRoutes: Routes = [ + { + path: 'login', + component: LoginComponent, + data: { + meta: { + titleSuffix: ' - Login' + } + } + } +]; + +@NgModule({ + imports: [ RouterModule.forChild(loginRoutes) ], + exports: [ RouterModule ] +}) +export class LoginRoutingModule {} diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts index c4ff7050b..fd4a314cc 100644 --- a/client/src/app/login/login.component.ts +++ b/client/src/app/login/login.component.ts @@ -2,7 +2,8 @@ import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Router } from '@angular/router'; -import { AuthService, FormReactive } from '../shared'; +import { AuthService } from '../core'; +import { FormReactive } from '../shared'; @Component({ selector: 'my-login', diff --git a/client/src/app/login/login.module.ts b/client/src/app/login/login.module.ts new file mode 100644 index 000000000..31a723b43 --- /dev/null +++ b/client/src/app/login/login.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; + +import { LoginRoutingModule } from './login-routing.module'; +import { LoginComponent } from './login.component'; +import { SharedModule } from '../shared'; + +@NgModule({ + imports: [ + LoginRoutingModule, + SharedModule + ], + + declarations: [ + LoginComponent + ], + + exports: [ + LoginComponent + ], + + providers: [ + ] +}) +export class LoginModule { } diff --git a/client/src/app/login/login.routes.ts b/client/src/app/login/login.routes.ts deleted file mode 100644 index 2f63af5e2..000000000 --- a/client/src/app/login/login.routes.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { LoginComponent } from './login.component'; - -export const LoginRoutes = [ - { - path: 'login', - component: LoginComponent, - data: { - meta: { - titleSuffix: ' - Login' - } - } - } -]; -- cgit v1.2.3