mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
added tests for hostReducer and Header Effects, and switch to typed actions
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { Store } from "@ngrx/store";
|
||||
import { HeaderState } from "./header.reducer";
|
||||
import { HeaderActions } from "./header.actions";
|
||||
import { Observable } from "rxjs";
|
||||
import 'rxjs/add/operator/filter';
|
||||
import {
|
||||
HeaderCollapseAction,
|
||||
HeaderExpandAction,
|
||||
HeaderToggleAction
|
||||
} from "./header.actions";
|
||||
|
||||
@Component({
|
||||
selector: 'ds-header',
|
||||
@@ -25,15 +28,15 @@ export class HeaderComponent implements OnInit {
|
||||
}
|
||||
|
||||
private collapse(): void {
|
||||
this.store.dispatch(HeaderActions.collapse());
|
||||
this.store.dispatch(new HeaderCollapseAction());
|
||||
}
|
||||
|
||||
private expand(): void {
|
||||
this.store.dispatch(HeaderActions.expand());
|
||||
this.store.dispatch(new HeaderExpandAction());
|
||||
}
|
||||
|
||||
public toggle(): void {
|
||||
this.store.dispatch(HeaderActions.toggle());
|
||||
this.store.dispatch(new HeaderToggleAction());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user