浏览代码

21-278 Creating basic core module

tags/before_ngrx
Nils Dittberner 8 年前
父节点
当前提交
ea3f0d652a
共有 8 个文件被更改,包括 29 次插入9 次删除
  1. +1
    -1
      src/app/app-routing.module.ts
  2. +4
    -6
      src/app/app.module.ts
  3. +22
    -0
      src/app/core/core.module.ts
  4. +0
    -0
      src/app/core/header/header.component.html
  5. +2
    -2
      src/app/core/header/header.component.ts
  6. +0
    -0
      src/app/core/home/home.component.css
  7. +0
    -0
      src/app/core/home/home.component.html
  8. +0
    -0
      src/app/core/home/home.component.ts

+ 1
- 1
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 },


+ 4
- 6
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,


+ 22
- 0
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 {}

src/app/header/header.component.html → src/app/core/header/header.component.html 查看文件


src/app/header/header.component.ts → 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',

src/app/home/home.component.css → src/app/core/home/home.component.css 查看文件


src/app/home/home.component.html → src/app/core/home/home.component.html 查看文件


src/app/home/home.component.ts → src/app/core/home/home.component.ts 查看文件


正在加载...
取消
保存