Rewire frontend with AngularJS