From 50b0c262fd446e9f57630aa5775e1b4708bdf4cb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 29 Nov 2016 21:41:11 +0100 Subject: [PATCH] Client: move menu component in core module --- client/src/app/app.module.ts | 5 +---- client/src/app/core/core.module.ts | 9 ++++++--- client/src/app/core/menu/index.ts | 1 + client/src/app/{ => core/menu}/menu.component.html | 0 client/src/app/{ => core/menu}/menu.component.ts | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 client/src/app/core/menu/index.ts rename client/src/app/{ => core/menu}/menu.component.html (100%) rename client/src/app/{ => core/menu}/menu.component.ts (92%) diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 555f412e7..e9bb800f4 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -16,8 +16,6 @@ import { LoginModule } from './login'; import { SharedModule } from './shared'; import { VideosModule } from './videos'; -import { MenuComponent } from './menu.component'; - const metaConfig: MetaConfig = { //Append a title suffix such as a site name to all titles //Defaults to false @@ -35,8 +33,7 @@ const APP_PROVIDERS = [ @NgModule({ bootstrap: [ AppComponent ], declarations: [ - AppComponent, - MenuComponent + AppComponent ], imports: [ BrowserModule, diff --git a/client/src/app/core/core.module.ts b/client/src/app/core/core.module.ts index be29b88da..27e6ee1fb 100644 --- a/client/src/app/core/core.module.ts +++ b/client/src/app/core/core.module.ts @@ -1,17 +1,20 @@ import { NgModule, Optional, SkipSelf } from '@angular/core'; import { CommonModule } from '@angular/common'; import { HttpModule } from '@angular/http'; +import { RouterModule } from '@angular/router'; import { AuthService } from './auth'; +import { MenuComponent } from './menu'; import { throwIfAlreadyLoaded } from './module-import-guard'; @NgModule({ imports: [ CommonModule, - HttpModule + HttpModule, + RouterModule ], - declarations: [ ], - exports: [ ], + declarations: [ MenuComponent ], + exports: [ MenuComponent ], providers: [ AuthService ] }) export class CoreModule { diff --git a/client/src/app/core/menu/index.ts b/client/src/app/core/menu/index.ts new file mode 100644 index 000000000..d07a1144c --- /dev/null +++ b/client/src/app/core/menu/index.ts @@ -0,0 +1 @@ +export * from './menu.component'; diff --git a/client/src/app/menu.component.html b/client/src/app/core/menu/menu.component.html similarity index 100% rename from client/src/app/menu.component.html rename to client/src/app/core/menu/menu.component.html diff --git a/client/src/app/menu.component.ts b/client/src/app/core/menu/menu.component.ts similarity index 92% rename from client/src/app/menu.component.ts rename to client/src/app/core/menu/menu.component.ts index d1a1d51e7..f1bf6966d 100644 --- a/client/src/app/menu.component.ts +++ b/client/src/app/core/menu/menu.component.ts @@ -1,8 +1,8 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; -import { AuthService } from './core'; -import { AuthStatus } from './shared'; +import { AuthService } from '../auth'; +import { AuthStatus } from '../../shared'; @Component({ selector: 'my-menu', -- 2.41.0