Integration of Google Endpoints with AngularJS