Rewrite from jQuery to Angular