Angular Telephone Filter

A simple Angular filter to clean or format a US telephone number.

Demo on Plunker


Or, include the JavaScript file in the head of your document:

Include the module as a dependency of your application:


  • Angular >1.4


The filter expects a single parameter to be passed in to control the filter direction. A parameter of clean will return only the numbers (ie 1235551234) while the format parameter will direct the filter to output the formatted number (ie (123) 555-1234);

Use in the DOM:

Use in a controller


  • npm run build - produces production version of your library under the dist folder
  • npm run dev - produces development version of your library under the dist folder and runs a watcher

All idea and code contributions welcome!

comments powered by Disqus
This page was last updated over 2 years ago.