refactor(angular.js): improve trim performance

According to Flagrant Badassery's blog http://blog.stevenlevithan.com/archives/faster-trim-javascript and this comparision http://jsperf.com/trim-function, this trim method is faster.