Basic client side implementation in angular.js