Errata

AngularJS: Up and Running

Errata for AngularJS: Up and Running

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
PDF Page 24
2nd paragraph

it is a JavaScript objects, not JSON objects.

the book says

introduced an array of JSON objects in our MainCtrl

JSON is just a notation, by using string to represent an object.

The code is using, simply, an array of JavaScript objects. It has nothing that related to JSON: using string representation to denote a JavaScript object.

Kenneth Kin Lum  Mar 02, 2016 
Printed Page 28
Last paragraph

Since 1.4.0-beta.1 trepidatious-salamander (2015-01-20) ng-repeat doesn't sort by alphabetic order of keys anymore, but instead uses the order of the objects it iterates over.

https://github.com/angular/angular.js/commit/c260e7386391877625eda086480de73e8a0ba921

Dennie Grondelaers  Sep 01, 2015 
Printed Page 63
Other Form Controls

on page 63 section Other Form Controls --> Checkboxes.In the code example were it reads,

ng-true-value="YES" and ng-false-value="NO"

there are missing single quote marks ' inside the dubble quote marks. It should read,

ng-true-value=" ' YES ' " and ng-false-value=" ' NO ' ".

Anonymous  Mar 10, 2016 
Printed Page 65
1st paragraph

Whereas the code listing detailing the use of radio buttons with a local scope 'ng-init' directive is correct, nowhere is it pointed out that you need at least one controller in the page to get it to work...even if that controller is empty (as it is not needed in this example as a model based in 'ng-init' is used instead).

<script>
angular.module('radioExample', [])
.controller('ExampleController', [function() {
}]);
</script>

Obviously you need an ' ng-app="radioExample" ' directive in your HTML somewhere. For instance on the <HTML> tag.

Jaran Finn  Mar 27, 2015 
PDF Page 71-72, 75
example code

2-documents in the example code for Chapter 4 "Forms, inputs, and Services" have mislabeled document names.

Example code named "checkbox-example.html" (found in the "chapter4" folder) contains the code for "select-example.html" example on pages 71-72 (PDF edition.)

Example code named "select-example.html" (found in the "chapter4" folder) contains the code for "checkbox-example.html" example on page 75 (PDF edition.)

Jeremy French  Jul 28, 2015 
PDF Page 113
Bulgaria

Spies section, code example // File: chapter7/notesApp1SpecWithSpies.js


spyOn(ItemService, 'list').andCallThrough(); should be spyOn(ItemService, 'list').and.CallThrough();

Anton Antonov  Apr 16, 2015 
PDF Page 118
1st set of list items

`verifyNoOutstandingExpectations()` and `verifyNoOutstandingRequests()` are both non-existing functions. They should be singular as - `verifyNoOutstandingExpectation()` and `verifyNoOutstandingRequest()`

Anton Antonov  Apr 17, 2015 
PDF Page 127
"orederBy" paragraph

The sentence

"... The predicate expression can also be passed a function, ..."

should be

"... The predicate expression can also be passed by a function, ..."

Gianluca Esposito  Feb 05, 2015 
Printed Page 174
1st Paragraph after code block

The first paragraph after the code demo for ng-switch states that there are five buttons to appear, but only four are defined in the code.

The code also doesn't behave as described in the book. As we're missing a fifth button, which I assume was meant to include the random element, however it's not present in the code. So there is no random element. And there's no code for this random-ness to occur.

There is a default case button, but nothing to set a random value.

Anonymous  Feb 01, 2016 
PDF Page 185
3rd unlisted item

• The value of stockData is bound to the object that the HTML attribute stockdata
points to. Any change in the controller’s value is immediately relected in the
stockData variable in the directive’s scope as well.

should read

• The value of stockData is bound to the object that the HTML attribute stockdata
points to. Any change in the controller’s value is immediately reflected in the
stockData variable in the directive’s scope as well.

Gianluca Esposito  Feb 10, 2015 
PDF Page 202
1st paragraph, second sentence, last word

Book: AngularJS Up and Running
Published: September 2014 First Edition, Second Release on 2015-04-02.
Chapter 11: Directives
Page: 202

The last word ("heirarchy") in the second sentence of the first paragraph is misspelled. The word should be "hierarchy".

The sentence with the misspelling reads:

"This is because the moment we isolate the scope, the directive can no longer access anything from its parent scope because it is removed from the traditional scope heirarchy."


Jeremy French  Jan 01, 2016