This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constructor(unsubscribe?: () => void) { | |
if (unsubscribe) { | |
(<any> this)._unsubscribe = unsubscribe; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constructor(unsubscribe?: () => void) { | |
if (unsubscribe) { | |
(<any> this)._unsubscribe = unsubscribe; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface SubscriptionLike extends Unsubscribable { | |
unsubscribe(): void; | |
readonly closed: boolean; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (isFunction(_unsubscribe)) { | |
try { | |
_unsubscribe.call(this); | |
} catch (e) { | |
// some error logic | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { Effect, Actions } from '@ngrx/effects'; | |
import { of } from 'rxjs/observable/of'; | |
import { map, switchMap, catchError } from 'rxjs/operators'; | |
import * as fromRoot from '../../../app/store'; | |
import * as movieActions from '../actions/movie.action'; | |
import * as fromServices from '../../services'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { EffectsModule } from '@ngrx/effects'; | |
import { MovieEffects } from './effects/movie.effects'; | |
@NgModule({ | |
imports: [ | |
... | |
EffectsModule.forRoot([MovieEffects]) | |
] | |
}) | |
export class AppModule {} |
NewerOlder