Stop toggling classes with JS, use behaviour driven DOM manipulation with states

Using a class to manipulate the DOM? What about this idea. Using classes have many issues, the main one for me is that adding classes to elements to change t... | Continue reading


@toddmotto.com | 5 years ago

NGRX Store: Actions versus Action Creators

Actions in the Redux paradigm are the initiators of the one-way dataflow process for state management. Once an action is triggered, or rather dispatched, the... | Continue reading


@toddmotto.com | 5 years ago

Testing Reducers in NGRX Store

Next in this series, we’re going to learn how to test Reducers in NGRX Store. In the previous testing post we explored Testing Actions. | Continue reading


@toddmotto.com | 6 years ago

Testing Actions in NGRX Store

In this small NGRX Store testing series, we’re going to learn how to test Actions, Reducers and Selectors. Let’s begin with Actions, or more specifically Act... | Continue reading


@toddmotto.com | 6 years ago

Angular Classes with NgClass

With Angular, we have many approaches to adding, removing, toggling classes. We can choose single classes and bind a property, or we can use the awesome NgCl... | Continue reading


@toddmotto.com | 6 years ago

Typing Arrays in TypeScript

There are many ways we can type a property to declare to TypeScript something is an array, or contains an array of “something”. We have generic types, array ... | Continue reading


@toddmotto.com | 6 years ago

Step by Step Custom Pipes in Angular

Angular has many Pipes built-in, but they only take us so far. Ideally we’d like to extend our applications by creating custom Pipes. | Continue reading


@toddmotto.com | 6 years ago

Handling Observables with NgIf and the Async Pipe

Dealing with async operations with the async pipe takes care of subscribing to Observable streams/async stuff like Promises for us. | Continue reading


@toddmotto.com | 6 years ago

Angular's NgIf, Else, Then - Explained

Using the ngIf directive allows us to simply toggle content based on a conditional. But is it as simple as we think? Not quite, the directive has a heap of h... | Continue reading


@toddmotto.com | 6 years ago

Introduction to TypeScript

Since its inception, JavaScript has experienced monumental growth - especially in recent years. | Continue reading


@toddmotto.com | 6 years ago

Classes vs Interfaces in TypeScript

Classes and interfaces are powerful structures that facilitate not just object-oriented programming but also type-checking in TypeScript. A class is a bluepr... | Continue reading


@toddmotto.com | 6 years ago

NGRX Store: Understanding State Selectors

Selectors are pure functions that take slices of state as arguments and return some state data that we can pass to our components. To better understand what ... | Continue reading


@toddmotto.com | 6 years ago