Mastering Web Application
Communicating with a Back-end Server As web developers, we need to constantly balance security considerations with functional re ...
Chapter 3 As soon as this script tag is attached to the DOM the browser will request the URL specified in the src attribute. The ...
Communicating with a Back-end Server The whole idea behind CORS is that a browser and a foreign server need to coordinate (by se ...
Chapter 3 We can see two requests (OPTIONS and DELETE) targeting the same URL: The response from the MongoLab server includes he ...
Communicating with a Back-end Server The sample SCRUM application described in this book relies on the node.js server configured ...
Chapter 3 Working with promises and the $q service To learn the relatively small API exposed by the $q service, we are going to ...
Communicating with a Back-end Server The unit test starts by the call to the $q.defer() method which returns a deferred object. ...
Chapter 3 Promises are first-class JavaScript objects At first glance it might look like the Promise API adds unnecessary comple ...
Communicating with a Back-end Server pizzaDelivered.then(pawel.eat, pawel.beHungry); pizzaPit.problemWithOrder('no Capricciosa, ...
Chapter 3 Any callbacks registered after a promise was resolved (or rejected) will be resolved (or rejected) with the same resul ...
Communicating with a Back-end Server pawel.beHungry); pizzaPit.problemWithOrder('no Capricciosa, only Margherita left'); expect( ...
Chapter 3 The other scenario that we should consider is re-throwing exceptions as it might happen that recovery won't be possibl ...
Communicating with a Back-end Server ]); ordersDelivered.then(pawel.eat); pizzaPit.deliverOrder(); saladBar.deliverOrder(); expe ...
Chapter 3 Continuing our "pizza and salad" example, we could imagine that a salad is ready (synchronous action) but a pizza need ...
Communicating with a Back-end Server The $timeout service returns a promise that will be resolved with a value returned from a t ...
Chapter 3 Calls to the $http service methods return promises with two additional methods (success and error) for easy callback r ...
Communicating with a Back-end Server apiKey:'4fb51e55e4b02e56a67b0b66', id:'@_id.$oid' }); }) We start by registering a recipe ( ...
Chapter 3 The second argument to the $resource function allows us to define default parameters that should be sent with each req ...
Communicating with a Back-end Server Instance level methods The $resource service will not only generate a constructor function, ...
Chapter 3 For example, the MongoLab REST API is using the HTTP POST method to create new items but the PUT method must be used t ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf