rewrite app in angular