Mastering Web Application
Communicating with a Back-end Server }, { update: {method:'PUT'} }); Users.prototype.getFullName = function() { return this.firs ...
Chapter 3 Fortunately it is possible to use callbacks in the methods generated by the $resource factory and rewrite the precedin ...
Communicating with a Back-end Server '/collections/' + collectionName; var defaultParams = {apiKey:MONGOLAB_CONFIG.API_KEY}; //u ...
Chapter 3 return Resource.remove(this); }; //other CRUD methods go here //convenience methods Resource.prototype.$id = function ...
Communicating with a Back-end Server .factory('Users', function (mongolabResource) { return mongolabResource('users'); }) .contr ...
Chapter 3 As the initial example, let's assume that we want to retry failed requests. To do so we can define an interceptor that ...
Communicating with a Back-end Server Testing code that interacts with $http Testing code calling external HTTP services is often ...
Chapter 3 $scope : $scope }); })); it('should return all users', function () { //setup expected requests and responses $httpBack ...
Communicating with a Back-end Server Summary This chapter guided us through different methods of communicating with a back- end ...
Displaying and Formatting Data Now that we know how to get data from a back-end into a browser we can focus on displaying and ma ...
Displaying and Formatting Data In the AngularJS documentation all the directives are indexed under their camel-case name (For ex ...
Chapter 4 myModule.config(function($interpolateProvider) { $interpolateProvider.startSymbol('[['); $interpolateProvider.endSymbo ...
Displaying and Formatting Data Using the ng-bind-html-unsafe directive we will get the HTML fragment with the tags interpreted ...
Chapter 4 The ng-show/ng-hide family of directives can be used to hide (by applying CSS display rules) parts of the DOM tree bas ...
Displaying and Formatting Data The ng-if directive is available only in the most recent version of AngularJS: 1.1.x or 1.2.x. In ...
Chapter 4 Repeater's implementation is highly optimized and will try to minimize number of DOM changes needed to reflect data st ...
Displaying and Formatting Data The mentioned variables come in very handy in many real-life situations. For example, in the samp ...
Chapter 4 Iterating over objects' properties, while being supported, has limitations. The main issue is that we can't control it ...
Displaying and Formatting Data <tr ng-switch-when="true"> <td colspan="2">{{user.desc}}</td> </tr> </ ...
Chapter 4 This example is interesting since we are using the ng-controller directive for each item. A provided controller can au ...
«
2
3
4
5
6
7
8
9
10
11
»
Free download pdf