Susan Harkins (325) [Avatar] Offline
#1
Please post errors in the published version of Angular in Action here. If necessary, we'll publish a comprehensive list for everyone's convenience. Thank you!

Susan Harkins
Errata Editor
Manning Publications
41242 (1) [Avatar] Offline
#2
My source code
[ 938 bytes ]
Chapter 7, Listing 7.7. Published code is:

ngOnInit() {
this.route.queryParams
.subscribe(params: Query => {
this.return = params['return'] || '/forums';
if (!this.userService.isGuest()) {
this.go();
}
});
}

This fails to compile. I modified it to:

ngOnInit() {
this.route.queryParams
.subscribe( params => {
this.return = params['return'] || '/forums';
if (!this.userService.isGuest()) {
this.go();
}
});
}

Also, you remove the OnInit import, and the implements OnInit, which caused ngOnInit to error out. I put these back in.
312507 (2) [Avatar] Offline
#3
Errata in Angular in Action - Page 34
Code sample to download material CSS from Material Design Light is as follows:

<link rel="stylesheet" href="//storage.googleapis.com/code.getmdl.io/1.0.1/material.indigo-orange.min.css">


This link appears invalid and does not change the UI. I changed it to the following and this worked. MDL also recommends adding the JavaScript reference and adding the defer attribute so the script isn't executed until after the page fully loads.

<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-orange.min.css">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
jeremy.wilken (201) [Avatar] Offline
#4
Hello, can you share the error and more detail? You appear to just be removing TypeScript typing information.

41242 wrote:Chapter 7, Listing 7.7. Published code is:

ngOnInit() {
this.route.queryParams
.subscribe(params: Query => {
this.return = params['return'] || '/forums';
if (!this.userService.isGuest()) {
this.go();
}
});
}

This fails to compile. I modified it to:

ngOnInit() {
this.route.queryParams
.subscribe( params => {
this.return = params['return'] || '/forums';
if (!this.userService.isGuest()) {
this.go();
}
});
}

Also, you remove the OnInit import, and the implements OnInit, which caused ngOnInit to error out. I put these back in.
jeremy.wilken (201) [Avatar] Offline
#5
Errata in Angular in Action - Page 34
Hello, the link is still valid and works when I test it. You also do not need the script tag, as we don't use any of the JavaScript for that library in the example, just the CSS. I don't believe this is an issue, but if it is still please explain further.

312507 wrote:Code sample to download material CSS from Material Design Light is as follows:

<link rel="stylesheet" href="//storage.googleapis.com/code.getmdl.io/1.0.1/material.indigo-orange.min.css">


This link appears invalid and does not change the UI. I changed it to the following and this worked. MDL also recommends adding the JavaScript reference and adding the defer attribute so the script isn't executed until after the page fully loads.

<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-orange.min.css">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
jeremy.wilken (201) [Avatar] Offline
#6
There is a typo as found in this post: https://forums.manning.com/posts/list/42920.page

For some reason the line is duplicated in the final version of the pdf.
312507 (2) [Avatar] Offline
#7
Errata in Angular in Action - Page 34
jeremy.wilken wrote:Hello, the link is still valid and works when I test it. You also do not need the script tag, as we don't use any of the JavaScript for that library in the example, just the CSS. I don't believe this is an issue, but if it is still please explain further.


Thanks, Jeremy. I don't know what happened but when I first attempted this it was definitely not working and would not apply the appropriate styles. Now it's working for me, as well. Sorry for the false alarm, maybe there was just some sort of networking issue occurring at the time on Google's end.