• Selects an observable using the given path selector, and runs it through the given transformer function. A transformer function takes the store observable as an input and returns a derived observable from it. That derived observable is run through distinctUntilChanges with the given optional comparator and attached to the store property.

    Think of a Transformer as a FunctionSelector that operates on observables instead of values.

    import { select$ } from '@angular-redux2/store';

    export const debounceAndTriple = obs$ => obs$
    .debounce(300)
    .map(x => 3 * x);

    class Foo {
    @Select$(['foo', 'bar'], debounceAndTriple)
    readonly debouncedFooBar$: Observable<number>;
    }

    Type Parameters

    • T

    Parameters

    • selector: Selector<any, T>

      A selector function, property name string, or property name path (array of strings/array indices) that locates the store data to be selected

    • transformer: Transformer<any, T>

      transformer that operates on observables instead of values.

    • Optional comparator: Comparator

      Function used to determine if this selector has changed.

    Returns PropertyDecorator

Generated using TypeDoc