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/account/account-routing.module.ts | 22 ++++++++++++++++++++ client/src/app/account/account.module.ts | 26 ++++++++++++++++++++++++ client/src/app/account/account.routes.ts | 13 ------------ client/src/app/account/account.service.ts | 3 ++- client/src/app/account/index.ts | 3 ++- 5 files changed, 52 insertions(+), 15 deletions(-) create mode 100644 client/src/app/account/account-routing.module.ts create mode 100644 client/src/app/account/account.module.ts delete mode 100644 client/src/app/account/account.routes.ts (limited to 'client/src/app/account') diff --git a/client/src/app/account/account-routing.module.ts b/client/src/app/account/account-routing.module.ts new file mode 100644 index 000000000..8c1033cd2 --- /dev/null +++ b/client/src/app/account/account-routing.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +import { AccountComponent } from './account.component'; + +const accountRoutes: Routes = [ + { + path: 'account', + component: AccountComponent, + data: { + meta: { + titleSuffix: ' - My account' + } + } + } +]; + +@NgModule({ + imports: [ RouterModule.forChild(accountRoutes) ], + exports: [ RouterModule ] +}) +export class AccountRoutingModule {} diff --git a/client/src/app/account/account.module.ts b/client/src/app/account/account.module.ts new file mode 100644 index 000000000..53f6ba58e --- /dev/null +++ b/client/src/app/account/account.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from '@angular/core'; + +import { AccountRoutingModule } from './account-routing.module'; +import { AccountComponent } from './account.component'; +import { AccountService } from './account.service'; +import { SharedModule } from '../shared'; + +@NgModule({ + imports: [ + AccountRoutingModule, + SharedModule + ], + + declarations: [ + AccountComponent + ], + + exports: [ + AccountComponent + ], + + providers: [ + AccountService + ] +}) +export class AccountModule { } diff --git a/client/src/app/account/account.routes.ts b/client/src/app/account/account.routes.ts deleted file mode 100644 index c382a6deb..000000000 --- a/client/src/app/account/account.routes.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { AccountComponent } from './account.component'; - -export const AccountRoutes = [ - { - path: 'account', - component: AccountComponent, - data: { - meta: { - titleSuffix: ' - My account' - } - } - } -]; diff --git a/client/src/app/account/account.service.ts b/client/src/app/account/account.service.ts index 355bcef74..0635c2533 100644 --- a/client/src/app/account/account.service.ts +++ b/client/src/app/account/account.service.ts @@ -1,6 +1,7 @@ import { Injectable } from '@angular/core'; -import { AuthHttp, AuthService, RestExtractor } from '../shared'; +import { AuthService } from '../core'; +import { AuthHttp, RestExtractor } from '../shared'; @Injectable() export class AccountService { diff --git a/client/src/app/account/index.ts b/client/src/app/account/index.ts index 823d9fe5f..be03713cb 100644 --- a/client/src/app/account/index.ts +++ b/client/src/app/account/index.ts @@ -1,3 +1,4 @@ +export * from './account-routing.module'; export * from './account.component'; -export * from './account.routes'; +export * from './account.module'; export * from './account.service'; -- cgit v1.2.3