Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit 8d3860d

Browse files
committed
some improvements and fixes; still errors. We should have a look at angular/angular-cli#1636
1 parent 9de5736 commit 8d3860d

File tree

6 files changed

+18
-12
lines changed

6 files changed

+18
-12
lines changed

src/app/app.module.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ import { AppComponent } from './app.component';
44
import { RouterModule } from '@angular/router'
55
import { IterationRoutes } from './app.routes'
66

7+
import { HomeComponent } from './home';
8+
79
@NgModule({
810
declarations: [
9-
AppComponent
11+
AppComponent,
12+
HomeComponent
1013
],
1114
imports: [
1215
BrowserModule,

src/app/app.routes.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { HomeComponent } from './home/home.component';
33

44
export const IterationRoutes: RouterConfig = [
55
{
6-
path: '',
6+
path: '',
77
component: HomeComponent
88
},
99
{
1010
path: 'iteration-1',
11-
loadChildren: 'app/book-monkey/iteration-1/iteration-1.module#IterationOneModule'
11+
loadChildren: './book-monkey/iteration-1/iteration-1.module'
1212
}
1313
/*,
1414
{

src/app/book-monkey/iteration-1/book-list/app.module.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { NgModule } from '@angular/core';
22
import { BrowserModule } from '@angular/platform-browser';
33
import { AppComponent } from './app.component';
4+
import { BookListComponent } from './book-list';
45

56
@NgModule({
67
declarations: [
7-
AppComponent
8+
AppComponent,
9+
BookListComponent
810
],
911
imports: [
1012
BrowserModule,
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import { NgModule } from '@angular/core';
22
import { IterationOneComponent } from './iteration-1.component';
33
import { RouterModule } from '@angular/router'
4-
import { IterationRoutes } from './app.routes'
4+
import { IterationRoutes } from './iteration-1.routes'
55

66
@NgModule({
77
declarations: [
88
IterationOneComponent
99
],
1010
imports: [
11-
RouterModule.forChild(IterationRoutes),
11+
RouterModule.forChild(IterationRoutes)
1212
],
1313
providers: [],
1414
bootstrap: [IterationOneComponent]
1515
})
16-
export class AppModule { }
16+
export class AppModule {
17+
constructor(){
18+
console.log('hi there');
19+
}
20+
}

src/app/home/home.component.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { Component } from '@angular/core';
2-
import { ROUTER_DIRECTIVES } from '@angular/router';
32

43
@Component({
5-
selector: 'home',
6-
7-
templateUrl: 'home.component.html',
8-
directives: [ROUTER_DIRECTIVES]
4+
templateUrl: 'home.component.html'
95
})
106
export class HomeComponent { }

src/app/home/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './home.component';

0 commit comments

Comments
 (0)