Skip to content

Instantly share code, notes, and snippets.

View dtomschitz's full-sized avatar
🎯
Focusing

David Tomschitz dtomschitz

🎯
Focusing
View GitHub Profile
@dtomschitz
dtomschitz / layout-dialog.module.ts
Created October 30, 2020 21:24 — forked from faan11/layout-dialog.module.ts
Angular MatDialog feature module layout
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
BreakpointObserver,
Breakpoints,
BreakpointState
} from '@angular/cdk/layout';
import { Observable } from 'rxjs';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
@dtomschitz
dtomschitz / create-generic-effect.ts
Last active November 12, 2021 10:51
Function for creating generic effects for @ngrx
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { Action, ActionCreator, Creator } from '@ngrx/store';
import { FunctionWithParametersType } from '@ngrx/store/src/models';
import { Observable, of } from 'rxjs';
import {
catchError,
concatMap,
delay,
map,
switchMap,