# Initials

We have created an initials pipe to get the first letter of two words( ie. full name). Lets have a look on it.

# Requirements


You can import CorePipesModule directly or import our CoreCommonModule which has all the required modules.

To use initials pipe, we need to import the CorePipesModule to that specific module where we want filter functionality.

import { CorePipesModule } from '@core/pipes/pipes.module';
declarations: [
imports: [
providers: []

# Usage

Use pipe initials with template variables to get initials.

Example :

<div class="avatar">
  <div class="avatar-content">{{ name | initials }}</div>

Here name is a template variable where initials will get applied.

You can check the demo on this (opens new window) page.

Last Updated: 3/9/2021, 1:15:52 PM