refactors html angular code