You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While making a new project, im trying to make things more "default" in the project and tried (without success) to create default patterns that i could reuse between components.
Describe the solution you'd like
By using the angular tokens, its possible to configure patterns to be used in whole app.
Taking CPF_CNPJ for example, it is translated to a mask that depends on the length, but i wanted just CPF or CNPJ and i didn't want to write everytime time those masks.
By providing a token with a key and value, would be possible to verify at position near the code from CPF_CNPJ all the values inside the token (token would be a array or an object) and check if the maskExpression is equal to one of the values and then swap the value with the mask provided. Would be literally swapping the string, nothing crazy and could be configured in the root of the app.
And for other similar situations for different countries, would be easier for people to not be dependent on updates here (as CPF_CNPJ is a brazilian thing, imagine making it for every specific country) and would have freedom to make their own static masks.
I could do it myself, but i have no knowledge about helping packages. :/
Describe alternatives you've considered
Couldn't find any possible ways add.
The text was updated successfully, but these errors were encountered:
🚀 feature request
Description
While making a new project, im trying to make things more "default" in the project and tried (without success) to create default patterns that i could reuse between components.
Describe the solution you'd like
By using the angular tokens, its possible to configure patterns to be used in whole app.
Taking CPF_CNPJ for example, it is translated to a mask that depends on the length, but i wanted just CPF or CNPJ and i didn't want to write everytime time those masks.
By providing a token with a key and value, would be possible to verify at position near the code from CPF_CNPJ all the values inside the token (token would be a array or an object) and check if the maskExpression is equal to one of the values and then swap the value with the mask provided. Would be literally swapping the string, nothing crazy and could be configured in the root of the app.
And for other similar situations for different countries, would be easier for people to not be dependent on updates here (as CPF_CNPJ is a brazilian thing, imagine making it for every specific country) and would have freedom to make their own static masks.
I could do it myself, but i have no knowledge about helping packages. :/
Describe alternatives you've considered
Couldn't find any possible ways add.
The text was updated successfully, but these errors were encountered: