angular-cn/aio/content/examples/toh-pt5
aschaap 5e8dcfd641 docs(docs-infra): fix (+) not accepting null error by using `Number` instead (#41570)
Fix unexpected error when following the tutorial (when going through it with stricter type checking enforced). While (+) converts a string to an integer, it does not account for the possibility that `this.route.snapshot.paramMap.get('id')` could return null (type: string | null). Since this null case is not a practical outcome, it is a matter of types; switching from (+) to the `Number` function eliminates this issue, making the tutorial more robust.
PR Close #41570
2021-04-12 21:08:21 -07:00
..
e2e/src docs: improve accessibility of toh-pt5 example (#40632) 2021-02-23 10:39:13 -08:00
src docs(docs-infra): fix (+) not accepting null error by using `Number` instead (#41570) 2021-04-12 21:08:21 -07:00
example-config.json docs(aio): rename ToH to match the guide name 2017-04-19 10:28:31 +01:00
stackblitz.json build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00