libs/ng-lib/src/lib/transfer-state/transfer-state.service.js
/**
     * Wraps an observable into scully's transfer state. If data for the provided `name` is
     * available in the state, it gets returned. Otherwise, the `originalState` observable will
     * be returned.
     *
     * On subsequent calls, the data in the state will always be returned. The `originalState` will
     * be returned only once.
     *
     * This is a convenience method which does not require you to use `getState`/`setState` manually.
     *
     * @param name state key
     * @param originalState an observable which yields the desired data
     */
Wraps an observable into scully's transfer state. If data for the provided `name` is
available in the state, it gets returned. Otherwise, the `originalState` observable will
be returned.

On subsequent calls, the data in the state will always be returned. The `originalState` will
be returned only once.

This is a convenience method which does not require you to use `getState`/`setState` manually.

@param name state key
@param originalState an observable which yields the desired data
Wraps an observable into scully ' s transfer state . If data for the provided ` name ` is available in the state it gets returned . Otherwise the ` originalState ` observable will be returned . On subsequent calls the data in the state will always be returned . The ` originalState ` will be returned only once . This is a convenience method which does not require you to use ` getState ` / ` setState ` manually . @param name state key @param originalState an observable which yields the desired data
useScullyTransferState(name, originalState) {
        if (isScullyGenerated()) {
            return this.getState(name);
        }
        return originalState.pipe(tap((state) => this.setState(name, state)));
    }
useScullyTransferState ( name , originalState ) { if ( isScullyGenerated ( ) ) { return this . getState ( name ) ; } return originalState . pipe ( tap ( ( state ) => this . setState ( name , state ) ) ) ; }
Wraps an observable into scully's transfer state.
Wraps an observable into scully ' s transfer state .