Categories
Angular Tutorials

Building a Reusable Angular Sorting Directive

We already achieved sorting by updating some signal httpResource. All in unison. But making every column sortable has some boilerplate code. We need a way to easily make our table sortable with minimal effort. In this post we will fix it by building a reusable Angular Sorting Directive, that is inspired from Material Sort without […]

Categories
Angular Opinions Tutorials

Add Sorting to Your Table Using Angular Signals

In the previous guide we populated HTML table with Angular httpResource API. You can read more about it. This time we will make the table interactive. We will find out how well httpResource and Angular Signals plays together when it comes to sorting. What are we building with Angular Signals Here is how the final […]

Categories
Angular Tutorials

Build an Angular HTML Table Using httpResource

In this guide we will build a table using live API data.We will use angular httpResource. Which was introduced to simplify asynchronous data handling using signals. Angular Version 22 marks the httpResource API as stable, making it default choice for simple GET requests. What we are building with angular httpResource The section shows the final […]

Categories
Angular Opinions Tutorials

Understanding Angular Checkbox Directives and Host Binding

Imagine we have directive that customizes the checkbox color and interaction. We want to make our checkbox checked base on certain condition. But line 5, the highlighted one will throw following error. What really happens is that Angular thinks we are binding directive on some host elements (container etc) that doesn’t have checked property. Angular […]

Categories
Angular Tutorials

Tailwind Arbitrary classes in Angular host properties

I wanted to add different classes to the host element based on certain condition. I could add the classes in the accompanying style file. However, they won’t be available to be used on the host element. Unless I change the encapsulation mode to ViewEncapsulation.None. That removes the encapsulation and make the style declarations global. Which […]