diff --git a/package.json b/package.json index 5c87a50..1ff7b4f 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ }, "private": true, "dependencies": { - "@angular-redux/form": "^6.2.0", - "@angular-redux/router": "^6.2.0", - "@angular-redux/store": "^6.2.0", + "@angular-redux/form": "^6.3.0", + "@angular-redux/router": "^6.3.0", + "@angular-redux/store": "^6.3.0", "@angular/common": "^4.1.0", "@angular/compiler": "^4.1.0", "@angular/core": "^4.1.0", diff --git a/src/app/animals/animal.actions.ts b/src/app/animals/animal.actions.ts index a631ea2..cc43600 100644 --- a/src/app/animals/animal.actions.ts +++ b/src/app/animals/animal.actions.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { dispatch } from '@angular-redux/store'; import { Action } from 'redux'; @Injectable() @@ -7,6 +8,7 @@ export class AnimalActions { static readonly LOAD_SUCCEEDED = 'LOAD_SUCCEEDED'; static readonly LOAD_FAILED = 'LOAD_FAILED'; + @dispatch() loadAnimals(animalType) { return { type: AnimalActions.LOAD_STARTED, diff --git a/src/app/elephants/elephant-page.container.ts b/src/app/elephants/elephant-page.container.ts index 59b02f3..c0ee5d4 100644 --- a/src/app/elephants/elephant-page.container.ts +++ b/src/app/elephants/elephant-page.container.ts @@ -31,9 +31,7 @@ export class ElephantPageComponent { @select(['elephants', 'loading']) readonly loading$: Observable; @select(['elephants', 'error']) readonly error$: Observable; - constructor( - ngRedux: NgRedux, - actions: AnimalActions) { - ngRedux.dispatch(actions.loadAnimals(ANIMAL_TYPES.ELEPHANT)); + constructor(actions: AnimalActions) { + actions.loadAnimals(ANIMAL_TYPES.ELEPHANT); } } diff --git a/src/app/feedback/feedback-form/feedback-form.component.html b/src/app/feedback/feedback-form/feedback-form.component.html index 887be7a..f3aed0b 100644 --- a/src/app/feedback/feedback-form/feedback-form.component.html +++ b/src/app/feedback/feedback-form/feedback-form.component.html @@ -28,7 +28,7 @@

Feedback Form