diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 4617c72..0d8b8f7 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router' import { ShoppingListComponent } from './shopping-list/shopping-list.component'; -import { HomeComponent } from './home/home.component'; +import { HomeComponent } from './core/home/home.component'; const appRoutes: Routes = [ { path: '', component: HomeComponent }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 90ab355..359f845 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -9,18 +9,15 @@ import { AuthGuard } from './auth/auth-guard.service'; import { AuthModule } from './auth/auth.module'; import { AuthService } from './auth/auth.service'; import { DataStorageService } from './shared/data-storage.service'; -import { HeaderComponent } from './header/header.component'; import { RecipeService } from './recipes/recipe.service'; import { SharedModule } from './shared/shared.module'; import { ShoppingListModule } from './shopping-list/shopping-list.module'; import { ShoppingListService } from './shopping-list/shopping-list.service'; -import { HomeComponent } from './home/home.component'; +import { CoreModule } from './core/core.module'; @NgModule({ declarations: [ - AppComponent, - HeaderComponent, - HomeComponent + AppComponent ], imports: [ BrowserModule, @@ -29,7 +26,8 @@ import { HomeComponent } from './home/home.component'; AppRoutingModule, SharedModule, ShoppingListModule, - AuthModule + AuthModule, + CoreModule ], providers: [ ShoppingListService, diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts new file mode 100644 index 0000000..4c5ae81 --- /dev/null +++ b/src/app/core/core.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from "@angular/core"; + +import { HeaderComponent } from "./header/header.component"; +import { HomeComponent } from "./home/home.component"; +import { SharedModule } from "../shared/shared.module"; +import { AppRoutingModule } from "../app-routing.module"; + +@NgModule({ + declarations: [ + HeaderComponent, + HomeComponent + ], + imports: [ + SharedModule, + AppRoutingModule + ], + exports: [ + AppRoutingModule, + HeaderComponent + ] +}) +export class CoreModule {} \ No newline at end of file diff --git a/src/app/header/header.component.html b/src/app/core/header/header.component.html similarity index 100% rename from src/app/header/header.component.html rename to src/app/core/header/header.component.html diff --git a/src/app/header/header.component.ts b/src/app/core/header/header.component.ts similarity index 81% rename from src/app/header/header.component.ts rename to src/app/core/header/header.component.ts index b647300..e846498 100644 --- a/src/app/header/header.component.ts +++ b/src/app/core/header/header.component.ts @@ -1,6 +1,6 @@ import { Component } from "@angular/core"; -import { DataStorageService } from "../shared/data-storage.service"; -import { AuthService } from "../auth/auth.service"; +import { DataStorageService } from "../../shared/data-storage.service"; +import { AuthService } from "../../auth/auth.service"; @Component({ selector: 'app-header', diff --git a/src/app/home/home.component.css b/src/app/core/home/home.component.css similarity index 100% rename from src/app/home/home.component.css rename to src/app/core/home/home.component.css diff --git a/src/app/home/home.component.html b/src/app/core/home/home.component.html similarity index 100% rename from src/app/home/home.component.html rename to src/app/core/home/home.component.html diff --git a/src/app/home/home.component.ts b/src/app/core/home/home.component.ts similarity index 100% rename from src/app/home/home.component.ts rename to src/app/core/home/home.component.ts