angular-enterprise-application-development-samples
angular-enterprise-application-development-samples copied to clipboard
2019年6月第1版2019年6月第1次印刷勘误、改进项
封面
封面设计建议带勒口,这样书角不容易折皱。
前言IV
“75个”应为“74个”
98页
“1.从路由参数中提取” 小节中。 原文“修改user.service.ts文件,在ngOnInit()生命周期钩子中调用getUsers(),代码如下:”
需要修改为:
“修改user-detail.component.ts文件,在ngOnInit()生命周期钩子中调用getUser(),代码如下:”
146页
“component-interaction”应为“component-styles”
390页
倒数第二行的“(3)0”应为“(3)”
第299页,“app/customers/customers.module#CustomersModule”应为“./customers/customers.module#CustomersModule”
@haowushimang 感谢反馈!
98页const id=+this.route.snapshot.paramMap.get('id');应改为const id=+this.route.snapshot.paramMap.get('id')!;(增加非空断言) 99页return of(USERS.find(user=>user.id===id));应改为return of(USERS.find(user=>user.id===id) as User); (增加类型) 以上两点如果不改在angular 11中会报错。
98页const id=+this.route.snapshot.paramMap.get('id');应改为const id=+this.route.snapshot.paramMap.get('id')!;(增加非空断言) 99页return of(USERS.find(user=>user.id===id));应改为return of(USERS.find(user=>user.id===id) as User); (增加类型) 以上两点如果不改在angular 11中会报错。
@wwwzgy 感谢反馈!