mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
57053: started on menu
This commit is contained in:
23
src/app/navbar/navbar.effects.ts
Normal file
23
src/app/navbar/navbar.effects.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Effect, Actions } from '@ngrx/effects'
|
||||
import * as fromRouter from '@ngrx/router-store';
|
||||
|
||||
import { HostWindowActionTypes } from '../shared/host-window.actions';
|
||||
import { NavbarCollapseAction } from './navbar.actions';
|
||||
|
||||
@Injectable()
|
||||
export class NavbarEffects {
|
||||
|
||||
@Effect() resize$ = this.actions$
|
||||
.ofType(HostWindowActionTypes.RESIZE)
|
||||
.map(() => new NavbarCollapseAction());
|
||||
|
||||
@Effect() routeChange$ = this.actions$
|
||||
.ofType(fromRouter.ROUTER_NAVIGATION)
|
||||
.map(() => new NavbarCollapseAction());
|
||||
|
||||
constructor(private actions$: Actions) {
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user