Design Time Modification of Angular Component State with Slice


We are using Slice as a Central Reactive State Manager for our Angular application, and we want to check verify / debug component behavior during development.


Create a temporary service and inject both the central state service and the action service and call methods on the action service that initialize the components state context:

providedIn: 'root'
export class TempService {
private a:ActionsService,
private s:StateService ) {

The application state and actions can now be triggered from this service. Remember to inject it into app.component.ts .




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ole Ersoy

Ole Ersoy

Founder of Firefly Semantics Corporation