Run quick and dirty NGRX Signal Store debugging

Tomasz Ducin
InstructorTomasz Ducin
Share this video with your friends

Social Share Links

Send Tweet
Published 3 months ago
Updated 2 months ago

In this lesson, we learn how to quickly debug NgRx signal stores by accessing properties directly in a component's template and using the Angular json pipe for a readable output.

[00:00] Sometimes you need to do some debugging very quickly to figure out whether a correct value exists within the store. For this reason, we can simply call out the store and try to read some of the properties available and simply use the built in Angular JSON pipe. However, if [00:19] you're using the standalone components or generally the standalone APIs, make sure that the JSON pipe is available with whatever is visible for the components. So either you can, in case of the JSON pipe, uncomment the entire common module, or if you want to basically use only one [00:39] element, then you can simply import the JSON pipe itself. So here, we can see that is loading signal is being read and passed into the JSON pipe, and, hence, here it is displayed. We can also try to read the error property, and we'll also see that there is a [00:59] false no value available. If we want to do some more advanced debugging, then we will be covering NGRX toolkit later in the course.

egghead
egghead
~ 41 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today