NgxStoreDecorators is a set of useful decorators and classes for quickly create NgRx store facades,
assigning values, observables or observables values to class properties.
This package introduce:
@StoreSelect(), @StoreSubscribe(), @StoreDispatch() decorators
and StoreFacade abstract class for NgRx store maintaining,
@Select(), @Subscribe() decorators and WithSubscriptions abstract class
to assign observables or observables values and handle subscriptions,
also @Get() to assign values from injected classes method or properties.
Default is set to false. Set to true if you want to console.log all new values from an observable.
Optional for @StoreSelect(), @StoreSubscribe(), @Select(), @Subscribe()
pipe - [?OperatorFunction<any, any>[]]
Here you can pass some RxJs operators.
Optional for @StoreSelect(), @StoreSubscribe(), @Select(), @Subscribe()
subscriptionsCollector - [?string]
Default is set to subscriptions witch should be an RxJs Subscription instance.
You can extend component or service with StoreFacade or WithSubscriptions abstract classes
to automatically add this property to class.
Optional for @StoreSubscribe(), @Subscribe()
takeUntil - [?string]
You can handle subscriptions by takeUntil operator.
Here you just pass a name of the class property witch should be Subject instance.
Optional for @StoreSubscribe(), @Subscribe()
args - [?any[]]
You can resolve injection method with given arguments.
Optional for @Select(), @Subscribe(), @get()
Demo
To see decorators and classes usage in real app check
DEMO
or download git repository then type