refactor angular