Angular Signals: Best practices around exposing Signals
Angular Training Blog
by Alain Chautard
3w ago
Some best practices are emerging as Signals are available in developer preview with Angular 16. As a reminder, this is how we create a Signal with Angular: currency = signal('USD'); This creates a WritableSignal, meaning that any code that has a reference to that Signal can update its value with: currency.set('CAD'); While being able to update a Signal from anywhere can be convenient, it can also lead to components taking over too much of the business logic of an application. With Angular, we want to delegate that part to services, which is why when using RxJs Subjects, we ..read more
Visit website
How to pick the right dependencies for your Angular application?
Angular Training Blog
by Alain Chautard
1M ago
Photo by Gabriel Sollmann on Unsplash Choosing the right libraries/dependencies for your Angular applications can make or break your project in the long run. I’ve seen way too many consulting clients stuck with an older version of Angular because of a dependency that isn’t maintained anymore. Here are a few rules to follow: 1. Are you sure you need a dependency for this? Do you really need one library for your date picker, one for your multi-select dropdowns, and one for your dialogs? The more dependencies you use, the more likely you are to get stuck at some point. HTML/CS ..read more
Visit website
Angular Signals: Questions and Answers
Angular Training Blog
by Alain Chautard
2M ago
Photo by Moritz Kindler on Unsplash The Angular team is working on a new feature called signals. Signals are the answer to several different requests from the developer community over the years, more specifically: Being able to use Observables with @Input Being able to use Angular without Zone.js to have more control over change detection. With state management built into the framework, we no longer need libraries like NgRx or NgXs. Being able to use Angular in a reactive way without relying on RxJs. In other words, Signals will be a clear and unified model for how data f ..read more
Visit website
What’s new in Angular 15.1?
Angular Training Blog
by Alain Chautard
4M ago
Angular evolves steadily, with major versions every six months, minor versions every month, and weekly patch versions as needed. The first minor version since Angular 15 was released a few days ago. While it is a minor version, there are still a few noteworthy updates to mention. Self-closing tags This might not be a big deal, yet developers who like writing more concise code will be pleased to learn that Angular 15.1 now supports self-closing tags. This means that what we had to do before when using a component: <my-component></my-component> Can now be replaced with t ..read more
Visit website
Learn Angular little by little in 2023
Angular Training - Medium
by Alain Chautard
4M ago
As 2022 comes to a close, people start thinking about resolutions for the upcoming year. What if one of those resolutions was to become a better Angular developer? This is why I decided to launch a daily Angular Newsletter (you can subscribe here) starting on January 2nd, 2023. The goal of that newsletter is to be concise, helpful, non-invasive, and of course, to build a lot of knowledge over time. The few rules I intend to follow with the newsletter are: Short updates: Every email should be readable in 30 to 60 seconds maximum, so it’s not overwhelming for the reader. Five days pe ..read more
Visit website
Router utility functions in Angular 14+
Angular Training - Medium
by Alain Chautard
4M ago
This post illustrates some new router utility functions available in developer preview since Angular v14. You’re probably familiar with the syntax: imports: [RouterModule.forRoot([ {path: 'crisis-list', component: CrisisListComponent}, {path: 'heroes-list', component: HeroesListComponent}, ])] We can now replace that syntax with: providers: [provideRouter([ {path: 'crisis-list', component: CrisisListComponent}, {path: 'heroes-list', component: HeroesListComponent}, ])] If you’re wondering “why” the Angular team added those functions to the framework now, the ..read more
Visit website
What’s new in Angular 15?
Angular Training - Medium
by Alain Chautard
4M ago
Angular 15 was released in early November 2022. This version brings a lot of new features, more than what we’ve been used to with previous major versions of Angular. Let’s dive into some of the significant new features one by one: Directive composition API Before Angular 15, we could use inheritance to create a directive extending another. While inheritance works, it is often more flexible to use composition instead, and that’s precisely what Angular 15 allows us to do. How does that work? If we want to create a component or directive that automatically has one or more other di ..read more
Visit website
Learn Angular little by little in 2023
Angular Training - Medium
by Alain Chautard
4M ago
As 2022 comes to a close, people start thinking about resolutions for the upcoming year. What if one of those resolutions was to become a better Angular developer? This is why I decided to launch a daily Angular Newsletter (you can subscribe here) starting on January 2nd, 2023. The goal of that newsletter is to be concise, helpful, non-invasive, and of course, to build a lot of knowledge over time. The few rules I intend to follow with the newsletter are: Short updates: Every email should be readable in 30 to 60 seconds maximum, so it’s not overwhelming for the reader. Five days pe ..read more
Visit website
Router utility functions in Angular 14+
Angular Training - Medium
by Alain Chautard
4M ago
This post illustrates some new router utility functions available in developer preview since Angular v14. You’re probably familiar with the syntax: imports: [RouterModule.forRoot([ {path: 'crisis-list', component: CrisisListComponent}, {path: 'heroes-list', component: HeroesListComponent}, ])] We can now replace that syntax with: providers: [provideRouter([ {path: 'crisis-list', component: CrisisListComponent}, {path: 'heroes-list', component: HeroesListComponent}, ])] If you’re wondering “why” the Angular team added those functions to the framework now, the ..read more
Visit website
What’s new in Angular 15?
Angular Training - Medium
by Alain Chautard
4M ago
Angular 15 was released in early November 2022. This version brings a lot of new features, more than what we’ve been used to with previous major versions of Angular. Let’s dive into some of the significant new features one by one: Directive composition API Before Angular 15, we could use inheritance to create a directive extending another. While inheritance works, it is often more flexible to use composition instead, and that’s precisely what Angular 15 allows us to do. How does that work? If we want to create a component or directive that automatically has one or more other di ..read more
Visit website

Follow Angular Training Blog on Feedspot

Continue with Google
Continue with Apple
OR