2015-05-05 angular►filter►trim Angular filter to trim string By: Ryan Wong at May 5 2015 6:12 pm This directive is useful for trimming a string. 12345function trim(){ return function (str) { return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); };} Hope this helps you out. Newer Push Notification With Laravel 4 Older Angular filter to show how much time ago from a date object