The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
Version |
Location |
Description |
Submitted By |
Date submitted |
Date corrected |
Printed |
Page 24
Deathray template div |
<div/> s/b </div>
Note from the Author or Editor: Correction is right. I've made the update in the manuscript.
|
Martin Bing |
Aug 09, 2013 |
Sep 11, 2013 |
Printed |
Page 33
middle of page |
order is backwards in explanation of the two basic options for watching multiple things:
* put them into an array or object...
* watch a concatenated value...
"In the first case...." : describes watching a concatenated value
"In the second case..." : describes using an object and deepWatch
|
Anonymous |
Jul 19, 2013 |
Sep 11, 2013 |
PDF |
Page 91
Code sample |
The ng-href URL should be relative rather than absolute.
The following:
ng-href="/#/view/{{recipe.id}}"
should be replaced with:
ng-href="#/view/{{recipe.id}}"
Note from the Author or Editor: While the ng-href mentioned in the code snippet works in the context of the example (because of the way the code is structured), it is generally better practise to have ng-href URLs as relative than absolute.
|
nonplus |
Jul 13, 2013 |
Sep 11, 2013 |
PDF |
Page 90
Code sample |
Despite what the text says on the next page, the links (<a href="..."/>) contain absolute URLs ("/#/new" and "/#/") .
The hrefs should be change to contain the hash paths without the lading '/', e.g. "#/new" and "#/".
Note from the Author or Editor: While the examples work in the context of the sample code, it is better to have the links be relative URLs rather than absolute.
|
nonplus |
Jul 13, 2013 |
Sep 11, 2013 |
PDF |
Page 81
Warning |
The IE warning says that you have to call Recipe[delete](). There should quotes around 'delete', e.g.:
Recipe['delete']().
Note from the Author or Editor: There was a typo in the book where the quotation marks surrounding the word "delete" were not printed.
The correct code should read
Recipe['delete']()
|
nonplus |
Jul 13, 2013 |
Sep 11, 2013 |
PDF |
Page 45
Section on Validating User Input |
While this might be obvious, it might be a good idea to mention that AngularJS adds CSS classes to the form fields and to explicitly include the example code's header with the CSS style rule in the printed text.
Note from the Author or Editor: Good point. I'd actually like to cover form validation in much greater detail. I'll add this to my next revision.
|
Anonymous |
Jun 17, 2013 |
|
Printed |
Page 122
Table 6-3 Options for directive declaration usage |
Example for directive restrict property for attribute A is wrong :
<div my-menu=Products></my-menu>
it should be (wrong closing tag)
<div my-menu=Products></div>
Note from the Author or Editor: The description here is correct. Fixed for the next revision.
|
Igor Bulovski |
Jun 10, 2013 |
Sep 11, 2013 |
PDF, ePub |
Page 95
6th Paragraph |
In the page it's said:
"Jumping back to our original template?Recipe form template?there is another nice usage of the ng-show highlighted within the ingredients repeater scope. The Add In‐ gredient button is shown only beside the last ingredient. This is accomplished by calling an ng-show and using the special $last variable that is accessible inside a repeater element scope."
There is no ng-show using $last variable in the code !!!
The code works because the <button> is after the ng-repeat ... and this solution is much better than the ng-show one ....
Note from the Author or Editor: The reporter is correct. The example was changed to reflect this and not use the special variable. This paragraph can be ignored
|
Pedro Costa |
May 28, 2013 |
Sep 11, 2013 |
Printed |
Page 61-64
Figures |
Each figure on pages 61-64 appears on the page with text describing a different tool.
For instance, Figure 3-2. Model tree in Batarang appears most closely to the text describing the Performance tab. It would be better if the text describing the figure was on the same page for Figures 3-2 through 3-5.
Note from the Author or Editor: As it is currently printed, the images of each of tabs of Batarang are in the following page of the section describing it.
It would make it easier to understand if the images were in the same page as the section describing it.
That is,
Model Tab section with Figure 3-2 ,
Performance Tab section with Figure 3-3,
Service Dependencies section with Figure 3-4,
Elements properties section with Figure 3-5,
each in one page.
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 56
2nd full paragraph |
The font used for the terminal "s" in "describes" is the monospace font. But the font used for the terminal "s" in "its" is the normal font.
Change the terminal "s" in "describes" to the normal font.
Note from the Author or Editor: The suggestion as stated is correct.
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 55
1st paragraph |
If "tearDowns" is plural, the preceding "setUp" should be "setUps."
Note from the Author or Editor: tearDown should be singular
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 49
First sentence under "Unit tests" |
Claiming that testing with AngularJS is "totally effortless" and then dedicating more than 6 pages to describing the totally effortless methods for testing is incongruous. Change the hyperbolic "totally effortless" to something more accurate.
Note from the Author or Editor: Text to be changed to:
"Testing is super important, and supported inherently when it comes to AngularJS."
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 48
Paragraph before "JS library dependencies |
The indentation of the paragraph should match that of the preceding paragraphs.
Note from the Author or Editor: The paragraph starting with "If you end up creating a new JS file.." needs to be indented to match the paragraph above it.
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 48
1st paragraph under "HTML Angular template files" |
Eliminate the "Now," at the beginning of the sentence.
In fact, search through the whole book for "Now" at the beginning of sentences and eliminate at least half of them -- it's overused and adds little.
Note from the Author or Editor: Suggestion is correct as stated.
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 46
Last paragraph |
"In the last two chapters" would be better as "In the previous two chapters." And it would be even better if it explicitly included the current chapter in the description somehow.
Perhaps, "In both this and the previous chapter,"
Note from the Author or Editor: Going with "In both this and the previous chapter,"
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 19
list item number 3 |
"Javascript" should be "JavaScript" to be consistent.
Note from the Author or Editor: Suggestion is correct as stated.
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 17
2nd to last paragraph |
On this page, $watch is demonstrated with the following code snippet:
$scope.$watch('funding.startingEstimate', computeNeeded);
But in the second to last paragraph it states, "but it won't work to watch the property funding.startingEstimate as this evaluates to zero"
It needs to be clarified that you mean the property literal (whch doesn't work) as opposed to the string name of the property (which does work).
Note from the Author or Editor: Changing to read:
You could also watch the return value of a function, but it won't work to watch the property literal +funding.startingEstimate+ as this evaluates to zero, its initial value, and that zero never changes.
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 15
item 4 in list |
Item number 4 in the list ends with "and the template is converted into view as a DOM"
Should it be "converted into *a* view?"
"as a DOM" is confusing, too. Maybe reword this thought?
Note from the Author or Editor: The last sentence can be changed to:
"The end result of this work is that the app is bootstrapped and the template is converted into a view".
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 11
2nd paragraph from the bottom |
"she'll have to download only it once."
should be
"she'll only have to download it once."
Note from the Author or Editor: The suggestion is correct as stated.
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 8
3rd paragraph from the bottom |
"I've created a dummy data hash to represent the collection of items"
should be
"I've created an array of dummy data hashes to represent..."
or equivalent.
Note from the Author or Editor: Change to
"I've created an array of dummy data to represent the collection of items"
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 5
2nd to last paragraph |
This sentence "You can write the rest of this code as well." doesn't make sense. The rest of what code? Perhaps something like, "Code you write can also be injected."
Note from the Author or Editor: Change
"You can write the rest of this code as well"
to:
"Any objects or services that you end up creating can also be injected in the same way."
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 4
1st paragraph |
In the sentence "Here we merge template HTML strings with data..." "Here" doesn't make sense. You're not in a room. Maybe s/Here// would be fine.
Note from the Author or Editor: Replace "Here" with "In AngularJS"
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page 4
1st paragraph |
"the ability to update, part of the DOM separately"
should be
"the ability to update part of the DOM separately"
s/,//
Note from the Author or Editor: The suggestion is correct as stated.
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
Printed |
Page vii
3rd paragraph |
Instead of "Misko and I decided we'd built a team" it should be "Misko and I decided we'd build a team"
s/built/build/
Note from the Author or Editor: Suggestion is correct as stated.
|
Matt Haggard |
May 17, 2013 |
Jun 04, 2013 |
ePub |
Page 51
First paragraph in "JS source files" section |
The second sentence contains an extraneous "the", i.e.:
..."will set up the the Angular module"...
Note from the Author or Editor: Need to drop the extra "the"
|
symbiat |
May 16, 2013 |
Jun 04, 2013 |
Printed |
Page 21
Controller code example |
The controller code is missing the controller name.
<ul ng-controller=''>
should read
<ul ng-controller='StudentListController'>
|
David Zechiel |
May 09, 2013 |
Jun 04, 2013 |
Printed |
Page 49
United States |
The first of two "traps" in the section "Integration tests" reads as follows:
"Yeoman does not create the tests/folder by default."
It should read:
"Yeoman does not create the tests/e2e folder by default."
Note from the Author or Editor: The errata and its fix is correct as reported
|
Jason |
May 07, 2013 |
Jun 04, 2013 |
PDF |
Page 147
Code below 3rd paragraph |
Similarly, if a Galaxy wanted to communicate downwards to its child, the Star System scope, then it could communicate as follows:
scope.$emit('selfDestructSystem', targetSystem);
should be:
scope.$broadcast('selfDestructSystem', targetSystem);
Note from the Author or Editor: The errata as well as the suggestion is correct.
|
Peter Beal |
May 03, 2013 |
Jun 04, 2013 |
Printed |
Page 37
United States |
The author states that when piping filters, the following binding:
{{12.9 | currency | number:0 }}
will display:
$13
In all my testing I only get an empty string displayed. No combination of the number and currency filters allowed me to round a value to the nearest whole dollar amount displayed as a currency.
Note from the Author or Editor: The errata is correct in that
{{12.9 | currency | number: 0}}
will display an empty string. This is because the currency filter returns a string, while the number filter expects a number value.
Changing this to :
{{12.9 | number:0 | currency}}
will print
$13.00
|
Bill Reid |
May 03, 2013 |
Jun 04, 2013 |
PDF |
Page 32
Second code block |
Code sample doesn't work because "bill.total" is undefined.
The line:
$scope.bill.totalCart = total;
should be:
$scope.bill.total = total;
Or we can also fix this in another manner :
The line:
<div>Total: {{bill.total | currency}}</div>
should be:
<div>Total: {{bill.totalCart | currency}}</div>
|
Adriano Labate |
Apr 28, 2013 |
Jun 04, 2013 |
Printed |
Page 7
top - resulting UI |
the resulting UI should show the <h1> as:
Your Order
Note from the Author or Editor: The code was changed to match the figure: "Your Shopping Cart"
|
Robert Collins |
Apr 28, 2013 |
Jun 04, 2013 |
Printed |
Page 30
CartController code |
the subtotal function should read:
return $scope.totalCart() - $scope.bill.discount;
rather than:
return $scope.totalCart() - $scope.discount;
|
Robert Collins |
Apr 28, 2013 |
Jun 04, 2013 |
PDF |
Page 17
1st paragraph |
$scope.needed = $scope.startingEstimate * 10
This should be changed to
$scope.funding.needed = $scope.funding.startingEstimate * 10
since you're interpolating {{funding.needed}} and data-binding ng-model = "funding.startingEstimate".
|
Anonymous |
Apr 22, 2013 |
Jun 04, 2013 |
PDF |
Page 17
middle |
computeNeeded = function() {
$scope.funding.needed = $scope.funding.startingEstimate * 10;
};
should be:
var computeNeeded = function() {
$scope.funding.needed = $scope.funding.startingEstimate * 10;
};
|
Anonymous |
Apr 22, 2013 |
Jun 04, 2013 |
PDF |
Page 18
bottom |
after the reset function executes the input changes to 0 but the computeNeeded function doesn't fire on the change. I thought it was supposed to do that. what's up?
Note from the Author or Editor: In the reset() function, we need to set $scope.needed = 0.
Another correction, so that the form doesn't submit when you hit the reset button, we should move the computeNeeded() function from ng-submit to an ng-click on the Fund my startup! button.
|
Tom Skinner |
Apr 20, 2013 |
Jun 04, 2013 |
ePub |
Page 23
Code listing at bottom |
$scope.menuState.show = false; will give an undefined error
Added $scope.menuState = {} before to fix the issue i.e.
function DeathrayMenuController($scope) {
$scope.menuState = {}
$scope.menuState.show = false;
...
|
kulehandluke |
Apr 19, 2013 |
Jun 04, 2013 |
ePub |
Page 18
Code listing at bottom |
The requestFunding function will always run which ever button you click because both <buttons> will submit to fix change the reset button to type="button" i.e.
<button type="button" ng-click="reset()">Reset</button>
Note from the Author or Editor: The fix I'm going with is to move the ng-submit= function on the form to an ng-click= on the Fund by Startup button.
|
kulehandluke |
Apr 19, 2013 |
Jun 04, 2013 |
Other Digital Version |
621
4th line of the StartUpController |
Line reads:
$scope.needed = $scope.startingEstimate * 10;
Should read:
$scope.needed = $scope.funding.startingEstimate * 10;
Note from the Author or Editor: This is in page 17 of the PDF in the "Templates and Data Binding" Section.
The reported error is correct, as is the suggestion. The StartupController example should read as:
function StartUpController($scope) {
$scope.funding = { startingEstimate: 0 };
$scope.computeNeeded = function() {
$scope.needed = $scope.funding.startingEstimate * 10;
};
}
|
thirdsite |
Apr 17, 2013 |
Jun 04, 2013 |
PDF |
Page 38
configuration block pseudo-code example |
"/path/to/tempate" should be "/path/to/template" (l missing)
|
Michael Klobutschar |
Apr 17, 2013 |
Jun 04, 2013 |
PDF, Mobi |
Page 36
template code block |
open TR tag is missing where ng-repeat should be present as well (of course ;-)
Note from the Author or Editor: Right. Need to insert a <tr> after the <table> line and before <td>{{item.title}}</td>.
|
Michael Klobutschar |
Apr 17, 2013 |
Jun 04, 2013 |
ePub |
Page 83
5th bullet point, "form validation controls." |
Bulleted section beginning "The other directive that we want to cover in some depth here is the form validation controls."
The description does not match the code listing.
There are no 'required' tags on any of the form inputs, the 'Save' button does not have the ng-disabled directive applied.
Note from the Author or Editor: The updated code in Github has the required tags and the ng-disabled directives.
The file is located at https://github.com/shyamseshadri/angularjs-book/blob/master/chapter4/guthub/app/views/recipeForm.html
The updated version of the book will have this code reflected.
|
steve.clason |
Apr 15, 2013 |
Jun 04, 2013 |
ePub |
Page 83
3rd paragraph below viewRecipe.html listing. |
The paragraph beginning "The next interesting usage is that of ng-show and ng-class to style the template." seems to refer to either a different file or to a different version of this file.
There is no ng-class or ng-show in the listing. No <i> either.
Note from the Author or Editor: In page 92 of the PDF and the book, the paragraphs starting with
"The next interesting usage is that of ng-show..."
till
"... That adds some special highlighting to make the title stand
out even more."
was referring to an example this is not there.
Please delete these 2 paragraphs. The next paragraph should start with
"The next thing to note is the ng-submit..."
|
steve.clason |
Apr 15, 2013 |
Jun 04, 2013 |
ePub |
Page 80
Code listing for list.html |
Text reads "The second is the usage of the ng-href tag instead of href. ",
but <href> is used in the code:
<div><a href="/#/view/{{recipe.id}}">{{recipe.title}}</a></div>
Note from the Author or Editor: The example detailing the list.html in page 91 of the PDF, and corresponding pages of other versions of the book need to use ng-href instead of href. The 5th line in the example should read:
<div><a ng-href="/#/view/{{recipe.id}}">{{recipe.title}}</a></div>
|
steve.clason |
Apr 15, 2013 |
Jun 04, 2013 |
PDF, ePub |
Page 45
controller.js sample code |
This line;
$scope.clickFocused = function {
is missing parentheses, should be:
$scope.clickFocused = function() {
Note from the Author or Editor: description of fix is correct
|
steve.clason |
Apr 15, 2013 |
Jun 04, 2013 |
PDF, ePub |
Page 42
Messages object |
message id 2, this line:
+'She doesn't move too fast, so just call me if you see her."
has inconsistent use of quotes, and single quote used as apostrophe is not escaped.
Note from the Author or Editor: Fix is correct, but on p 41 in PDF
|
steve.clason |
Apr 15, 2013 |
Jun 04, 2013 |
ePub |
Page 42
'messages' object |
id 2, this line:
message: "Nobody panic, but my pet python is missing from her cage.'
uses double quote to open, single quote to close. Should be:
message: 'Nobody panic, but my pet python is missing from her cage.'
|
steve.clason |
Apr 15, 2013 |
Jun 04, 2013 |
ePub |
Page 38
Template sample markup |
The name of the controller created earlier in this sample app was 'CartController' not 'ShoppingController'.
This line:
<body ng-controller="ShoppingController">
should be:
<body ng-controller="CartController">
|
steve.clason |
Apr 15, 2013 |
Jun 04, 2013 |
PDF, ePub |
Page 38
Template sample markup |
There is </div> at the bottom of the sample instead of </body>.
Note from the Author or Editor: p36 in PDF version
|
steve.clason |
Apr 15, 2013 |
Jun 04, 2013 |
PDF, ePub |
Page 38
'factory()' code sample |
This line:
{title: 'Polka dots', description: 'Dots with polka, price: 2.95},
is missing a closing single quote -- should be:
{title: 'Polka dots', description: 'Dots with polka, price: 2.95'},
Note from the Author or Editor: p35 in PDF. The fix here is incorrect. The final quote should go after the word polka as follows:
{title: 'Polka dots', description: 'Dots with polka', price: 2.95},
|
steve.clason |
Apr 15, 2013 |
Jun 04, 2013 |
PDF |
Page 40
list.hml |
<td><a href='#/view/{{message.id}}'>{{message.subject}}</td>
Tag A is not closed.
Note from the Author or Editor: This line should be corrected as:
<td><a href='#/view/{{message.id}}'>{{message.subject}}</a></td>
|
Ilya Bodrov |
Apr 15, 2013 |
Jun 04, 2013 |
PDF |
Page 6
An Example: Shopping Cart; code example, first line |
The ng-app is being defined as
<html ng-app='myApp'>
however it throws an error "Error: No module: myApp", because myApp is not defined in the script. So the line should be just
<html ng-app>
or the myApp should be defined
var myApp = angular.module('myApp', [])
Note from the Author or Editor: Please change the first line of the code snippet to read:
<html ng-app>
|
Ilya Bodrov |
Apr 15, 2013 |
Jun 04, 2013 |
ePub |
Page 33
$watch code example |
The code example doesn't work.
The second line of this function:
$scope.subtotal = function() {
return $scope.totalCart() - $scope.discount;
};
should be:
return $scope.totalCart() - $scope.bill.discount;
Also, this line of text:
You can see how this example would look to a user in Figure?2-1.
Should read:
You can see how this example, if it had been written more carefully, would look to a user in Figure?2-1.
|
Steve Clason |
Apr 14, 2013 |
Jun 04, 2013 |
ePub |
Page 27
Show/Hide code sample. |
Code sample doesn't work because "menuState" is undefined.
The line:
$scope.menuState.show = false;
should be:
$scope.menuState = { show: false };
|
Steve Clason |
Apr 14, 2013 |
Jun 04, 2013 |
ePub |
Page 26
code sample |
Line of code:
<button ng-click="insertTom()">Insert</button>
is outside the <ul> and so outside of the controller scope. So, the sample doesn't work. Controller should be registered in <body> or a containing <div>.
Note from the Author or Editor: The HTML for students list in page 22 of the book currently reads:
<ul ng-controller=''>
<li ng-repeat='student in students'>
<a href='/student/view/{{student.id}}'>{{student.name}}</a>
</li>
</ul>
<button ng-click="insertTom()">Insert</button>
The button will not have access to the insertTom() function because it is outside the scope of the controller. Instead, the entire HTML should be placed inside a DIV so that the button is also part of the controller scope. The HTML should read as:
<div ng-controller="StudentListController">
<ul>
<li ng-repeat='student in students'>
<a ng-href='/student/view/{{student.id}}'>{{student.name}}</a>
</li>
</ul>
<button ng-click="insertTom()">Insert</button>
</div>
|
Steve Clason |
Apr 14, 2013 |
Jun 04, 2013 |
PDF, ePub |
Page 184
Colophon, second paragraph |
This one is mostly amusing, but it appears the boxfish must be the world's widest fish, ranging ?from 3 to 50 meters wide?. I first spotted the error in the product description on the website ? it sort of leaped out at me.
Note from the Author or Editor: :)
|
hanche |
Apr 14, 2013 |
Jun 04, 2013 |
PDF |
Page 46
Form code example |
</ng-form> should be </form>
Note from the Author or Editor: The Sign up form HTML code incorrectly closes the form with </ng-form>
The corrected version of the html should close with
</form>
|
tthorley |
Apr 13, 2013 |
Jun 04, 2013 |
PDF |
Page 40
detail.html |
Opening div tag without a closing tag:
<div>
<strong>To:</strong>
<span ng-repeat='recipient in message.recipients'>{{recipient}} </span> <div>{{message.message}}</div>
Note from the Author or Editor: There is a closing <div> tag that is missing for the div that contains the list of recipients (in the sample code for detail.html). The code that reads as
<div>
<strong>To:</strong>
<span ng-repeat='recipient in message.recipients'>{{recipient}} </span>
<div>{{message.message}}</div>
Should read as:
<div>
<strong>To:</strong>
<span ng-repeat='recipient in message.recipients'>{{recipient}} </span>
</div>
<div>{{message.message}}</div>
|
tthorley |
Apr 13, 2013 |
Jun 04, 2013 |
PDF |
Page 27
3rd paragraph |
Pointing out the Angular's custom parser twice feels repetitive:
While you can do quite a lot with expressions, they are computed with a custom parser that?s part of Angular. They are not evaluated using JavaScript?s eval(), and are considerably more restrictive.
Instead, they are evaluated using a custom parser that comes with Angular.
Note from the Author or Editor: To reduce redundancy and remove the multiple references to "custom parser", the text instead can be changed to read as follows:
While you can do quite a lot with expressions, they are not equivalent to a regular javascript expression. They are not evaluated using Javascript's eval(), and are considerably more restrictive.
Instead, they are evaluated using a custom parser that comes with Angular.
|
tthorley |
Apr 13, 2013 |
Jun 04, 2013 |
PDF |
Page 41
messages array code snippet |
The third message in the message array is kinda screwed up with the double quotes/single quotes. I think the code example should be changed to:
messages = [{
id: 0, sender: 'jean@somecompany.com', subject: 'Hi there, old friend',
date: 'Dec 7, 2013 12:32:00', recipients: ['greg@somecompany.com'],
message: 'Hey, we should get together for lunch sometime and catch up.'
+'There are many things we should collaborate on this year.'
}, {
id: 1, sender: 'maria@somecompany.com',
subject: 'Where did you leave my laptop?',
date: 'Dec 7, 2013 8:15:12', recipients: ['greg@somecompany.com'],
message: 'I thought you were going to put it in my desk drawer.'
+'But it does not seem to be there.'
}, {
id: 2, sender: 'bill@somecompany.com', subject: 'Lost python',
date: 'Dec 6, 2013 20:35:02', recipients: ['greg@somecompany.com'],
message: 'Nobody panic, but my pet python is missing from her cage.'
+"She doesn't move too fast, so just call me if you see her."
}];
(look at the last line of the third message)
Note from the Author or Editor: Incorrect and inconsistent usage of single and double quotes in the line
message: "Nobody panic, but my pet python is missing from her cage.'
+'She doesn't move too fast, so just call me if you see her."
causes the syntax highlighting to break. Changing all the surrounding quotation marks to single quotes fixes the issue. The line would then read as follows:
message: 'Nobody panic, but my pet python is missing from her cage.'
+'She doesn't move too fast, so just call me if you see her.'
|
tthorley |
Apr 13, 2013 |
Jun 04, 2013 |
PDF |
Page 37
first code example |
var appMod = angular.module('app', ['SnazzyUIWidgets', 'SuperDataSync'];
should be:
var appMod = angular.module('app', ['SnazzyUIWidgets', 'SuperDataSync']);
(note the closing parenthesis)
Note from the Author or Editor: The line of code which showed the module declaration read as:
var appMod = angular.module('app', ['SnazzyUIWidgets', 'SuperDataSync'];
This is missing the closing ), and should read as
var appMod = angular.module('app', ['SnazzyUIWidgets', 'SuperDataSync']);
|
tthorley |
Apr 12, 2013 |
Jun 04, 2013 |
PDF |
Page 26
second code snippet |
The problem is with this line:
{name:'Green's Green Greens', cuisine:'Salads'}
The single quote for the possessive breaks the single quotes around the string, creating a syntax error.
Note from the Author or Editor: The line of code:
{name:'Green's Green Greens', cuisine:'Salads'},
incorrectly includes an apostrophe as part of the string.
The corrected line of code should read as
{name:'Green\'s Green Greens', cuisine:'Salads'},
with the apostrophe escaped
|
tthorley |
Apr 12, 2013 |
Jun 04, 2013 |
PDF |
Page 130
2nd code snippet |
The line ...
$scope.text = 'Hi there folks, I am the content
+ 'that was hidden but is now shown.';
... is missing a single quote after 'content'. This also causes the syntax coloring to be wrong.
Note from the Author or Editor: The line:
$scope.text = 'Hi there folks, I am the content
is missing a closing single quote. The line should read as follows:
$scope.text = 'Hi there folks, I am the content'
|
Pieter Herroelen |
Apr 12, 2013 |
Jun 04, 2013 |