Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CodeSequence/ngconf2019-ngrx-workshop
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b55f84214466e430f84bb71455ca4aa5dbf0e700
Choose a base ref
..
head repository: CodeSequence/ngconf2019-ngrx-workshop
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e61d37cb4955f1e16777bf66a7cd51b16e8f3a34
Choose a head ref
Showing with 7 additions and 4 deletions.
  1. +5 −2 src/app/books/{books.effects.ts → books-api.effects.ts}
  2. +2 −2 src/app/books/books.module.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import { mergeMap, map, catchError } from 'rxjs/operators';
import { EMPTY } from 'rxjs';

@Injectable()
export class BooksEffects {
export class BooksApiEffects {

@Effect()
loadBooks$ = this.actions$.pipe(
@@ -56,5 +56,8 @@ export class BooksEffects {
)
);

constructor(private booksService: BooksService, private actions$: Actions<BooksPageActions.BooksActions>) {}
constructor(
private booksService: BooksService,
private actions$: Actions<BooksPageActions.BooksActions | BooksApiActions.BooksApiActions>
) {}
}
4 changes: 2 additions & 2 deletions src/app/books/books.module.ts
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import { BooksListComponent } from './components/books-list/books-list.component
import { BooksTotalComponent } from './components/books-total/books-total.component';

import { EffectsModule } from '@ngrx/effects';
import { BooksEffects } from './books.effects';
import { BooksApiEffects } from './books-api.effects';

@NgModule({
imports: [
@@ -21,7 +21,7 @@ import { BooksEffects } from './books.effects';
RouterModule.forChild([
{ path: 'books', component: BooksPageComponent }
]),
EffectsModule.forFeature([BooksEffects])
EffectsModule.forFeature([BooksApiEffects])
],
declarations: [
BooksPageComponent,