CreditCardService
to get the credit card number, and on the pipe creditCardMask
to mask the number except the last 4 digits that are going to be visible.CreditCardComponent
in our root component.CreditCardComponent
and the pipe CreditCardMaskPipe
to the declarations
property, along with the root component of the module AppComponent
. In the other hand, our custom service is configured with the dependency injection system with the providers
property.providers
property should only be used in the root module. Doing this in a feature module is going to cause unintended consequences when working with lazy loaded modules.