Skip to main content

Usage

Assemble the avatar directives in your template.

API Reference

The following directives are available to import from the @ng-primitives/ng-primitives/avatar package:

NgpAvatarDirective

There are no inputs or outputs for this directive.

NgpAvatarImageDirective

There are no inputs or outputs for this directive.

NgpAvatarFallbackDirective

number
default:"0"
Define a delay before the fallback is shown. This is useful to only show the fallback for those with slower connections.

Global Configuration

You can configure the default options for all avatars in your application by using the provideNgpAvatarConfig function in a providers array.

NgpAvatarConfig

number
Define a delay before the fallback is shown. This is useful to only show the fallback for those with slower connections.

Schematics

You can use our schematic to generate a new avatar component.

Options

string
The name of the component.
string
The name of the project to add the component to.
string
The path to create the component.