TA rewrite in Angular