projects
/
examples
/
angular-tour-of-heroes
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP: 6: Get Data from a Server k) Search by name
[examples/angular-tour-of-heroes]
/
src
/
app
/
app.module.ts
diff --git
a/src/app/app.module.ts
b/src/app/app.module.ts
index
cffb82a
..
ccb148f
100644
(file)
--- a/
src/app/app.module.ts
+++ b/
src/app/app.module.ts
@@
-12,6
+12,9
@@
import { HeroesComponent } from './heroes/heroes.component';
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
import { MessagesComponent } from './messages/messages.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
import { MessagesComponent } from './messages/messages.component';
import { DashboardComponent } from './dashboard/dashboard.component';
+import { HeroSearchComponent } from './hero-search/hero-search.component';
+import { StoreModule } from '@ngrx/store';
+import { reducers, metaReducers } from './reducers';
@NgModule({
declarations: [
@NgModule({
declarations: [
@@
-19,7
+22,8
@@
import { DashboardComponent } from './dashboard/dashboard.component';
HeroesComponent,
HeroDetailComponent,
MessagesComponent,
HeroesComponent,
HeroDetailComponent,
MessagesComponent,
- DashboardComponent
+ DashboardComponent,
+ HeroSearchComponent
],
imports: [
BrowserModule,
],
imports: [
BrowserModule,
@@
-32,7
+36,11
@@
import { DashboardComponent } from './dashboard/dashboard.component';
// Remove it when a real server is ready to receive requests.
HttpClientInMemoryWebApiModule.forRoot(
InMemoryDataService, { dataEncapsulation: false }
// Remove it when a real server is ready to receive requests.
HttpClientInMemoryWebApiModule.forRoot(
InMemoryDataService, { dataEncapsulation: false }
- )
+ ),
+
+ StoreModule.forRoot(reducers, {
+ metaReducers
+ })
],
providers: [],
bootstrap: [AppComponent]
],
providers: [],
bootstrap: [AppComponent]