Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export function timespan$() {
const activatedRoute = inject(ActivatedRoute);
return activatedRoute.queryParams.pipe(
pluck('timespan'),
filterNil(),
distinctUntilChanged()
);
}
@Component({
selector: 'app-todo-page',
templateUrl: './todo-page.component.html'
})
export class TodoPageComponent {
data$ = timespan$().pipe(
switchMap(..)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment