Convert jqplay to angular.js