How to use ngx-avatar - 1 common examples

To help you get started, we’ve selected a few ngx-avatar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HaithemMosbahi / ngx-avatar / src / app / app.module.ts View on Github external
import { HttpClientModule } from '@angular/common/http';

import { AvatarModule } from 'ngx-avatar';

import { AppComponent } from './app.component';
import { UserService } from './user.service';

const avatarColors = ['#FFB6C1', '#2c3e50', '#95a5a6', '#f39c12', '#1abc9c'];

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    HttpClientModule,
    //AvatarModule,
    AvatarModule.forRoot({
      colors: avatarColors
    })
  ],
  providers: [UserService],
  bootstrap: [AppComponent]
})
export class AppModule {}

ngx-avatar

A universal avatar component for Angular applications that fetches / generates avatar based on the information you have about the user.

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis

Popular ngx-avatar functions