Rewrite using angular.js
implement direct approval API.