Preview let syntax in HTML template in Angular 18

Loading

Reading Time: 5 minutes Introduction In this blog post, I want to describe the let syntax variable that Angular 18.1.0 will release. This feature has debates in the Angular community because some people like it, others have concerns, and most people don’t know when to use it in an Angular application. I don’t know either, but I use the … Read more

Content Projection Fallback in ng-content in Angular

Loading

Reading Time: 3 minutes Introduction In this blog post, I want to describe a new Angular 18 feature called content projection fallback in ng-contentWhen content exists between the ng-content opening and closing tags, it becomes the fallback value. When projection does not occur, the fallback value is displayed. Bootstrap Application Bootstrap the component and the application configuration to start … Read more

Unified Control State Change Events – working with reactive form is never the same in Angular

Loading

Reading Time: 6 minutes Introduction In this blog post, I want to describe a new Angular 18 feature called unified control state change events that listen to events emitted from form groups and form controls. These events return an Observable that can pipe to different RxJS operators to achieve the expected results. Then, the Observable can resolve in an … Read more

Made typos in routes? Redirect routes with functions

Loading

Reading Time: 4 minutes Introduction In this blog post, I want to describe a new feature called redirect functions with routes. When defining routes in Angular, it is possible to catch and redirect a route to a different path using redirectTo. One example is to catch all unknown routes and redirect them to a 404 page. Another example is … Read more