Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 1.74 KB

README.md

File metadata and controls

58 lines (45 loc) · 1.74 KB

@baloise/web-app-pipes-angular

Continuous Release npm npm bundle size npm GitHub GitHub issues

Installation

npm install @baloise/web-app-pipes-angular

Add the pipe module to your app module.

import { NgModule } from '@angular/core'
import { BaloisePipeModule } from '@baloise/@baloise/web-app-pipes-angular'

import { AppComponent } from './app.component'

@NgModule({
  declarations: [AppComponent],
  imports: [BaloisePipeModule],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

Usage

The pipe functions are defined as Angular Pipes.

<span>{{ 'baloise' | balCapitalize }}</span>

The can be used in the component typescript file aswell.

import { Component } from '@angular/core'
import { balCapitalize } from '@baloise/web-app-pipes-angular'

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent {
  capitalize(value: string) {
    return balCapitalize(value)
  }
}