ScrollService
(#29658)
Based on Google Analytics error report, the following error happens occasionally (15% or total errors for 2019-03): ``` Cannot read property '0' of null TypeError: at t.scrollToPosition@main.js ``` This was a result of calling [ViewportScroller#scrollToPosition()][1] with `null`, which in turn happens when calling [ScrollService#scrollToPosition()][2] while `this.scrollPosition` is `null`. This can be a result of a `popstate` event without an associated history state. This commit fixes the error by checking whether `this.scrollPosition` is `null`, before using it with `scrollToPosition()`. (It also refactors away the unneeded internal `popStateFired` property.) [1]: https://github.com/angular/angular/blob/deca6a60d/packages/common/src/viewport_scroller.ts#L101-L105 [2]: https://github.com/angular/angular/blob/deca6a60d/aio/src/app/shared/scroll.service.ts#L158-L161 PR Close #29658
build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871)
build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871)
build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871)
Angular
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
68.6%
HTML
12.8%
JavaScript
8.4%
Pug
7%
Starlark
1.4%
Other
1.7%