fundsaccess / angular-iban

IBAN directives and pipes for Angular
MIT License
17 stars 7 forks source link

Inject it into a component #8

Closed dcalvoj closed 4 years ago

dcalvoj commented 4 years ago

Is it possible to inject it into a component? When I try it, it tells me: Error: Can't resolve 'angular-iban/lib/pipes/iban-formatter.pipe'

fundsaccess commented 4 years ago

Hello @dcalvoj,

here is a example how to use “IbanFormatterPipe” in component. Please try it and hope it will help you.

import { IbanFormatterPipe} from 'angular-iban';

@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'], providers: [ IbanFormatterPipe ] })

export class AppComponent implements OnInit {

constructor(private ibanFormatterPipe: IbanFormatterPipe ) {}

public ngOnInit(): void { this.ibanFormatterPipe.transform('DE12500105170648489890') } }

fundsaccess commented 4 years ago

No Response since 16 days, We will extend the readme with this example.