TypeScript

Exploring template literal types in TypeScript

Follow me along as I explore two new features of TypeScript 4.1, template literal types and recursive conditional types. All this to create a typed version of a function that reads data from an API.

Read
Web Components

Handling Observables in a LitElement component

In this post, we are going to explore how to handle Observables inside a LitElement component. What options we have for this and how I've created a generic solution. It will handle subscribing to a stream, with some extra features and built in functionality.

Read
Programming

Typed fake REST APIs

See how to create a fake REST API using JSON Server. TypeScript will protect us against any model changes and faker.js will help with generating random data. Use it for local development, testing or any other related activities.

Read
Angular

Custom Angular directives

In this post, we are going to talk about one of the most important building blocks of an Angular application. As we know, an application is like a tree of components. And these components are actually directives with a template. We’ll focus on Angular directives, both attribute and structural.

Read
Angular

Creating a toast service with Angular CDK

Angular Material is a great material UI design components library for your Angular applications. All the common parts needed to create components, things like layout, accessibility, common components like grid or tree have been isolated inside the CDK.

Read
NgRx

NgRx: tips & tricks

NgRx is one of the good options that developers choose to use in their Angular applications whenever the application grows a bit and something is needed to manage the state. While working with NgRx I’ve found out a series of tips that I would have loved to know beforehand.

Read
TypeScript

Barrel files: to use or not to use?

How to use barrel files in our projects. Should you use them? If yes, how to organize code around them and where to place these files. Read on to find out more.

Read
Angular

Using the Angular Router to navigate to external links

How to use the Angular router to navigate to external pages. This is helpful to trigger guards and warn the user or save data.

Read
NgRx

Update on testing NgRx Effects

A while ago I’ve written a post on how to test NgRx effects. If you did not read that one I encourage you to go and have a look. Since then, both NgRx and RxJs have released some new versions and there are some things we need to update in our tests.

Read
Angular

Custom preloading strategy for Angular modules

Lets say we have a medium sized Angular application and each large feature split into a lazy loaded module. When the application starts, we load only the main modules and all the routes are lazy loaded, including the first one that we navigate to.

Read
TypeScript

Use absolute paths for module imports

Handling imports is a bit more trickier to manage due to paths and constant refactoring that one will do inside a more complex application.

Read
Angular

Angular location service

There is a small and well hidden service inside Angular: the location service. As the name and documentation suggests, this is a class that is used to interact with the browser URL.

Read
NgRx

Testing NgRx effects

My approach in testing NgRx effects. Some of the things that worked and some that did not.

Read
NativeScript

Creating a Mobile App for a Smart Light Bulb with NativeScript & Angular

Since one of the awesome things I got from AngularConnect was a Magic Blue smart light bulb and NativeScript looks like an interesting framework, I’ve decided to create a small mobile app to interact with it.

Read