Function ngUndoMiddleware

  • Creates a middleware function for managing undo functionality based on the provided state watch map.

    Example

    const middleware: Array<Middleware> = [
    ngUndoMiddleware({
    'test': {
    path: 'path.to.data'
    }
    }),
    ];
    ngRedux.configureStore(rootReducer, {}, middleware, enhancer);
    @Dispatch
    public undo() {
    return undo('test');
    }

    @Dispatch
    public redo() {
    return redo('test');
    }

    @Dispatch
    public jump() {
    return jump('test', -2);
    }

    @Dispatch
    public jump() {
    return jump('test', 2);
    }

    Parameters

    • stateWatchMap: StateWatchMap

      The state watch map containing the initial settings.

    Returns any

    • The middleware function to be used with Redux.

Generated using TypeDoc