Tips

I post these on Twitter. Follow me if you want to see more of them.

The @for repeatedly renders content of a block for each item in a collection.

AngularAngular 17

When testing user input, make sure to dispatch an input event after setting the input element's value property.

AngularTesting

The Angular CDK provides the cdkTrapFocus directive, which traps Tab key focus within an element.

AngularAngular CDK

Angular's CDK provides a module with commonly used keycode constants.

AngularAngular CDK

Angular provides the NgSelectOption Directive, which contains two inputs: value and NgValue Use ngValue if you are building a select and you need to bind the entire object to the selects option

Angular

The cdkContextMenuTrigger directive opens a menu when a user right-clicks within its host element.

AngularAngular CDK

The cdkTextareaAutosize directive can be applied to any textarea to make it automatically resize to fit its content.

AngularAngular CDK

The cdkCopyToClipboard directive can be used to easily add copy-on-click functionality to an existing element.

AngularAngular CDK

Attribute binding in Angular helps you set values for attributes directly. With attribute binding, you can improve accessibility, style your application dynamically, and manage multiple CSS classes or styles simultaneously.

Angular

Template variables help you use data from one part of a template in another part of the template.

Angular

Defines the name that can be used in the template to assign this directive to a variable.

Angular

You can use SVG files as templates in your Angular applications. When you use an SVG as the template, you are able to use directives and bindings just like with HTML templates

Angular

Angular provides the SlicePipe, which creates a new Array or String containing a subset (slice) of the elements.

Angular

You can bind to keyboard events using Angular's binding syntax.

Angular

Angular's powerful CLI provides the ng update command to perform a basic update to the current stable release of the core framework and CLI

AngularCLI

Angular provides the TitleCasePipe, which capitalizes the first letter of each word and also transforms the rest of the word to lowercase

Angular

For debugging purposes around router events, Angular provides an easy way to log all internal navigation events to the console

Angular

As of Angular v15, you can Bootstrap an Angular application using a standalone component

Angular

To display a 404 page, Angular provides the possibility of adding a wildcard route

Angular

Angular provides the keyvalue pipe, which transforms an Object or Map into an array of key value pairs. With it, an Object or a Map can be iterated by *ngFor

Angular

If you want to explicitly enable native DOM validation UI with Angular forms, you can add the ngNativeValidate attribute to the <form> element

Angular

The ngForOf directive (*ngFor) not only provides the index exported value, but it also provides other exported values that can be aliased to local variables.

Angular

In order to make pluralization easier, Angular provides the ngPlural Directive which allows to display a particular template on a given value.

Angular

The RouterLinkActive directive provides the ariaCurrentWhenActive input which sets the aria-current to a specified value when the link becomes active

Angular
Using Angular v.19.0.3 🚀