Testing Smart Components and Services in Angular
9 minsWe take a look at writing unit and integration tests for smart components and services in Angular
I'm Josh Morony, and this website is a collection of my free content centered around creating modern Angular applications using the latest Angular features, and concepts like reactive and declarative code.
We take a look at writing unit and integration tests for smart components and services in Angular
A great way to start testing in Angular is to focus on testing the inputs and outputs of your dumb components
You may often hear that you should not subscribe to observables in Angular, but why? And when is it okay to subscribe?
This article takes a look at how to implement some commonly requested scenarios like pagination and retries using reactive and declarative code in Angular with RxJS and Signals
Using RxJS in combination with Angular signals can create a simple and powerful state management solution with no external libraries
The new State Adapt library makes it easier to manage state declaratively in Angular
We already have the Signals API, but once signal based components are available we will have access to far more power
Writing 100% declarative code isn't entirely feasible in Angular and in this article we will discuss why
Let's see what happens when we replace a 'service with a subject' with signals
Sometimes you need to use an imperative API, but you still have options if you want to keep your code declarative
We're going to examine how to refactor a single feature component that is doing everything into two distinct parts: a smart component and a dumb component
We take a look at an infinite scrolling list which presents an interesting problem when trying to code reactively
In this tutorial, we take a look at how to create reactive pagination in an Ionic and Angular application, without ever having to manually subscribe to an observable stream!
We take a look at how to handle errors from RxJS observable streams reactively when using the async pipe in Angular
We walk through how to use @ngrx/component-store to manage local state in an Angular application