refactor jquery based webapplication to angular app