Client side logic powered with AngularJS