The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

transformRequest

transformRequest

6:16
In this lesson Trevor will show you how to transform your requests using AngularJS's $http service's transformRequest option and TDD. This allows you to keep your applications domain clean when integrating with third party APIs.
Watch this lesson now
Avatar
egghead.io

In this lesson Trevor will show you how to transform your requests using AngularJS's $http service's transformRequest option and TDD. This allows you to keep your applications domain clean when integrating with third party APIs.

Avatar
Theron

Hi

I have a dumb question (please forgive me as I'm trying to understand) that might not be really related to this lesson. But in view.js on line 3, "api" is being passed into the controller's 3rd parameter (argument function) as the 2nd parameter to the function called "api".

Does that "api" map to 'services.Api' preceding it in the 2nd parameter to the controller.

In other words, how is the "api" argument to the "function($scope, api)" being mapped to 'services.Api'

thanks!

In reply to egghead.io
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?