Code Downloads & Errata

If you have purchased a Packt book and/or video, you can use this page to
  • Download the code or support files
  • View errata and amendments
  • Send us feedback

You selected

Mastering Web Application Development with AngularJS

Peter Bacon Darwin

Published 2013-08-23

Downloads

Please register your e-mail address to download files. We will e-mail you with a direct link to the code download. If you have bought this book, you can login to your account and download the code files from your account page.

Before downloading the files please tell us where you purchased this book.

Errata

- 36 submitted: last submission 23 Aug 2017

Errata Type: Technical
Page no : 39
Section :

JavaScript test runner called testacular is been renamed to Karma.

More information can be found at the following link:
https://www.npmjs.com/package/testacular

 

Errata type: Code | Page number: 233

The reference on the fifth line ng-model="model.value" should be ng-model="model.testValue"
The reference on the fourteenth line $scope.value should be $scope.model.testValue

Errata type: Code | Page number: 69

The third line $log.info("Hello, " + name + "!"); should be $log.info("Hello, " + name + "!"); }, timeout )

Errata type: Code | Page number: 31

In the Factories section, the last paragraph
notificationToArchive service should be notificationsArchive service

Errata type: Code | Page number: 266

The line   <validator key="required">$fieldLabel is required</validator>

should be <validator key="required">{{$fieldLabel}} is required</validator>

Errata type: Typo | Page number: 121

The line "This allows us to get access to lower-level properties of an event, prevent it default action, stop its propagation, and so on."
Should be "This allows us to get access to lower-level properties of an event, prevent its default action, stop its propagation, and so on."

Errata type: Code | Page number: 121

The line $scope.readPosition = function (item, $event) {
should be $scope.logPosition = function (item, $event) {

Errata type: Typo | Page number: 155

The line      $scope.getCssClasses = function(ngModelContoller) {
                 return {
                 error: ngModelContoller.$invalid && ngModelContoller.$dirty,
                 success: ngModelContoller.$valid && ngModelContoller.$dirty
should be   $scope.getCssClasses = function(ngModelController) {
                 return {
                 error: ngModelController.$invalid && ngModelController.$dirty,
                 success: ngModelController.$valid && ngModelController.$dirty

Errata type: Grammar | Page number: 15

The line     "Where might this argument might be coming from?"

should be  "Where might this argument be coming from?"

Errata type: Grammar | Page number: 21

The line     "While AngularJS event system is modeled after the DOM one, both event propagation systems are totally independent and have got no common parts."

should be   "While AngularJS event system is modeled after the DOM one, both event propagation systems are totally independent and have no common parts."

Errata type: Typo | Page number: 60

The line     "Can you notice how the angular.module('admin-projects')is repeated all over the place "

should be   "Can you notice how the angular.module('admin-projects')is repeated all over the place." 

Errata type: Typo | Page number: 17

The word prototypical should be prototypal

Errata type: Code | Page number: 188

The code snippet
angular.module('admin-projects', [])
.config(function ($routeProvider) {
$routeProvider.when('/admin/users', {...});
$routeProvider.when('/admin/users/new', {...});
$routeProvider.when('/admin/users/:userId', {...});
});
should be
angular.module('admin-projects', [])
.config(function ($routeProvider) {
$routeProvider.when('/admin/projects', {...});
$routeProvider.when('/admin/projects/new', {...});
$routeProvider.when('/admin/projects/:userId', {...});
});

 

Errata type: Typo | Page no: 46

The line      To makes things even easier our sample application relies on the hosted version of the MongoDB.

should be    To make things even easier our sample application relies on the hosted version of the MongoDB.

 

Errata type: Typo | Page no: 61

The line      In the SCRUM sample application we are going to use the later form of registering configuration and run functions as we find it more readable.

should be    In the SCRUM sample application we are going to use the latter form of registering configuration and run functions as we find it more readable.

 

Errata type: Typo | Page no: 146

The line      ng-options="user.email as getFullName(user)for user in users

should be   ng-options="user.email as getFullName(user)for user in users"

Errata type: Typo | Page no: 240

$formalities in the figure should be $formatters

 

Errata type: Typo | Page no: 297

The line      Simply put ting a given callback, executed as a result of a model change, can change the model value that was already computed and considered as stable.

should be    Simply putting a given callback, executed as a result of a model change, can change the model value that was already computed and considered as stable.

 

and

The code snippet        if (newValue <= $scope.starDate) {

                              $scope.endDate = oneDayAhead($scope.starDate);

 

should be  

                               if (newValue <= $scope.startDate) {

                              $scope.endDate = oneDayAhead($scope.startDate);

 

 

 

 

Errata type: Typo  Page no: 221

The line      In our compile function we simply add CSS classes to the element. based on the values of the attributes on the element.

should be   In our compile function we simply add CSS classes to the element based on the values of the attributes on the element.

 

 

Errata type: Typo | Page no: 276

 

The line      It would be rather bizarre, if we could reduce a price of an item from 100.00 € (euros) to 100.00 $ just be changing locale settings.

should be   It would be rather bizarre, if we could reduce a price of an item from 100.00 € (euros) to 100.00 $ just by changing locale settings.

Errata type: Typo | Page no: 81

The line        Firstly, we should only GET HTTP requests can be issued using the JSONP technique.

should be     Firstly, only GET HTTP requests can be issued using the JSONP technique.

 

Errata type: Typo | Page no: 137

 

The line     It is only upon expecting browser's console we can realize that in fact an error is logged:

should be  It is only upon inspecting browser's console we can realize that in fact an error is logged:

 

Errata type: Typo | Page no: 126

 

The line     When applied to an object other that an array those filters have no effect and will simply return a source object.

should be   When applied to an object other than an array those filters have no effect and will simply return a source object.

Errata type: Typo | Page no: 294

The line     T his is how the ng-modeldirective behaves by default

should be   This is how the ng-modeldirective behaves by default

Errata type: Typo | Page no: 275

The line           Having access to all the localization settings might come handy when writing custom directives and filters, but AngularJS already makes good use of those settings in the                          build in filters.

should be        Having access to all the localization settings might come handy when writing custom directives and filters, but AngularJS already makes good use of those settings in the                           built-in filters.

 

Errata type: Typo | Page no: 174

 

The line    There are cases where it would be beneficial to have exactly the same HTML markup, and only change the behavior and the data set up behind this partial. One example of                     such a situation is an edit form, where we would like to reuse the same form both for adding new items editing an existing item.

 

should be  There are cases where it would be beneficial to have exactly the same HTML markup, and only change the behavior and the data set up behind this partial. One example of                     such a situation is an edit form, where we would like to reuse the same form both for adding new items and editing an existing item.

Errata type: Typo  | Page no: 325

The line        Each entry in the $templateCacheservice has:a key equal to the template's URL and a value equal to the content of a template (converted and stored as a JavaScript string).

 

should be     Each entry in the $templateCacheservice has a key equal to the template's URL and a value equal to the content of a template (converted and stored as a JavaScript string).

Errata type: Typo | Page no: 72

 

The line       Practicing Test Driven Development (TDD) greatly reduces number of long debugging sessions.

should be    Practicing Test Driven Development (TDD) greatly reduces the number of long debugging sessions.

Errata type: Typo | Page no: 286


The line       varcustomFormats = {  

should be    var customFormats = {

 

and

The line        Otherwise we are using a format supplied in a call the original datefilter.

should be      Otherwise we are using a format supplied in a call to the original datefilter.

 

Errata type: Code | Page no: 89

The line    pawel.eat(slice(pizzaPit));

should be  pawel.eat(slice(pizzaPit.takeOrder('Margherita')));


 

Errata type: Graphics | Page no: 53

The "grunt.js" file in the screenshot will actually be "Gruntfile.js"

Errata type: Typo | Page no: 11

 

The line      Where might this argument might be coming from?

should be    Where might this argument be coming from?

Errata type: Typo | Page no: 30

 

The line      NoficiationsService

should be   NotificationsService

Errata type: Code | Page no: 192

 

the line: params:angular.extend({q:JSON.stringify({} || params)}, 

should be: params:angular.extend({q:JSON.stringify(params)}, 

Errata type: Grammar | Page no: 27

Module pattern is extremely useful to organize our code, but AngularJS goes one step further. 

should be: 

The module pattern is extremely useful to organize our code, but AngularJS goes one step further.
Errata type: Grammar | Page no: 28
The additional trouble is that we want to be able to use different archiving services in different application. 
should be: 

The additional trouble is that we want to be able to use different archiving services in different applications.
Errata type: Grammar | Page no: 29
In AngularJS there is a dedicated $ provide service that allows us to register different recipes for objects creation.
should be: 
In AngularJS there is a dedicated $ provide service that allows us to register different recipes for object creation.
Errata type: Grammar | Page no: 71
On each and every file save a complete suite of tests were executed providing an immediate health-check.
should be
On each and every file save a complete suite of tests was executed providing an immediate health-check.
Errata type: Grammar | Page no: 99
 a HTTP should be  an HTTP
Errata type: Grammar | Page no: 103
The example code starts by declaring a new module (mongolabResource) and a factory (mongolabResource) accepting a configuration object (MONGOLAB_CONFIG) 
those are the parts that should look familiar by now.
should be
The example code starts by declaring a new module (mongolabResource) and a factory (mongolabResource) accepting a configuration object 
(MONGOLAB_CONFIG). Those are the parts that should look familiar by now. 
Errata type: Grammar | Page no: 105
AngularJS interceptors make have use of the promise API, and this is what makes them so powerful. 
should be
AngularJS interceptors have use of the promise API, and this is what makes them so powerful. 
Errata type: Typo | Page no: 108
This chapter guided us through different methods of communicating with a back-end end to retrieve and manipulate data. 
should be
This chapter guided us through different methods of communicating with a back-end to retrieve and manipulate data.
Errata type: Grammar | Page no: 108
Not only we got familiar with the basic APIs of the $httpservice, but also we had a close look at different ways of dealing with the cross-origin requests. 
should be
Not only did we get familiar with the basic APIs of the $ http service, but also we had a close look at different ways of dealing with the cross-origin 
requests.

Errata type: Grammar | Page no: 60

Can you notice how the angular.module('admin-projects')is repeated all over the place

should be

Notice how the angular.module('admin-projects') is repeated all over the place.

Errata type: Grammar | Page no: 21

 

While AngularJS event system is modeled after the DOM one, both event propagation systems are totally independent and have got no common parts.

should be

While AngularJS event system is modeled after the DOM one, both event propagation systems are totally independent and have no common parts.

and 

The heading: Scopes lifecycle

should be 

 

Scopes' lifecycle  

Page no: 9

Instead of link builtwith.angularjs.org  you can now refer to  https://www.madewithangular.com