Use AngularJS handle time instead of pure JS