Link to home
Start Free TrialLog in
Avatar of Charles Baldo
Charles BaldoFlag for United States of America

asked on

Angular Telephone Filter without parenthesis

I am trying to filter a phone number
 <td colspan="2">{{listingDetails.BKRPhoneNum | tel}}</td>

This works but puts in parenthesis
(555) - 555-1212

I would need 555-555-1212

the phone number comes in as 5555551212

Thank you
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Do you really need to save it like 555-555-1212 ?
I think it's prefable to save without formating and apply formatting when displaying data
Avatar of Charles Baldo

ASKER

Sorry it is saved in database as 5555551212 that is what I have to work with.  I need to display as 555-555-1212.   The filter I have is displaying it as (555)-555-1212
could you post your filter?
you just need to remove the parentheses : "(" + xxx + ")"
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks I made the rookie error thinking the filter tel was an angular built in filter.  I will locate it and remove the ()