CategoryTypeScript

Angular Signals – When should I use what?

A
Developer signals

In my last article, I explained how our communication with the backend takes place and how we were able to build a very simple caching mechanism thanks to signals. In this blog post, I would now like to demonstrate how we use the signals from our services within the components. Views As mentioned in the previous post, we have, broadly speaking, “Views” and “Actions” for displaying data from the backend. In the Views, primarily only data is presented, and in Actions, this...

Angular Signals – How to reuse Backend Results?

A
Construction worker

After explaining in the last blog post what Angular Signals are and how they are used, I would like to delve into how we at calitime.ch handle Signals to keep our tool TimeRocket soaring through the cosmos in this article. We don’t use HTTPClient! First and foremost, I must start with a circumstance that may not be common for many teams using Angular: We do not use HttpClient (anymore).Normally, HttpClient is the preferred tool in Angular to make HTTP requests to a server. It returns...

Angular Signals – How to use them in a simple way?

A
Curvy road with signals

What are Signals? On May 3, 2023, Angular 16 was released, introducing the possibility to use Signals. Signals are another way to implement the reactive programming paradigm in Angular. For quite some time, RXJS has been available for this purpose, and it doesn’t seem to be disappearing from the Angular world anytime soon. Generally, the current consensus is that RXJS should be used for more complex problem scenarios since it is more powerful but also harder to grasp. However, for simpler...

Creating a lazy-loading wrapper component in Angular

C
Report

A couple of weeks ago, one of my colleagues was tasked with implementing multiple customizable reports for our software. So, he did some research and found ActiveReportsJS by Grapecity. It allows us to create templates for reports, which could then be edited by our users to fully customize the appearance of those reports. Not only that, but it allows for PDF previewing on the one hand and headless exporting the PDFs on the other.   To my surprise, the PDF rendering takes place in the...

Angular Component – part 3: Validation

A

This is part 3 of my series about Angular components.If you haven’t already, check out part 1 (one-way and two-way binding) and part 2 (ngModel) to see how and why to write an Angular component following the ngModel pattern.

Our goal for this part of the series is to learn how to validate your angular component’s user inputs to disable the submit of a form surrounding our form-control.

Type-safety across .Net and TypeScript – TypeScript-friendly JSON serialization of F# types

T

This is part 6 of how we generate types from our .Net backend to be used in our TypeScript client. Why do we even bother?Generating TypeScript constants from .Net constantsFinding the types used in communication between the .Net backend and the TypeScript clientGenerating TypeScript classes from .Net typesGenerating Angular Services from .Net WebApi ControllersTypeScript-friendly JSON serialization of F# typesTesting JSON serialization and deserializationPutting all the parts together None of...

Angular Component – Part 2: ngModel

A

In my last article, I’ve explained how to use @Input() and @Output() and how to combine them to offer two-way binding for your component. This time I want to take this component to behave like a proper control within a <form>-element that is using ngForm. What’s ngModel, and why should I use it? In a typical Angular application, we often encounter scenarios where we have to handle forms with various input controls and a button to send data or perform some sort of action. The...

Angular Component – Part 1: one-way binding vs. two-way binding

A

In this short blog series, I want to show how to create an Angular component that can be used for user inputs. I know this is a topic for which many articles have been published. But while there are great tutorials that explain how it’s done, many of them lack the answer to the question of why. This is the reason I’m describing in this series how and why we are writing our components the way we do here at TimeRocket. This will be a 5-part series on the topic, so bear with me if the...

Type-safety across .Net and TypeScript – Angular Services from WebApi Controllers

T

This is part 5 of how we generate types from our .Net backend to be used in our TypeScript client. Why do we even bother?Generating TypeScript constants from .Net constantsFinding the types used in communication between the .Net backend and the TypeScript clientGenerating TypeScript classes from .Net typesGenerating Angular Services from .Net WebApi ControllersTypeScript-friendly JSON serialization of F# typesTesting JSON serialization and deserializationPutting all the parts together...

Recent Posts