ScrollService
tests (#31390)
The `ScrollService` sets up some global `window` listeners. Previously, these listeners were never unregistered. This was not a problem in the real app, because the `ScrollService` instance exists for the lifetime of a user session. In tests, however, where the `window` instance is among all tests, the listeners would survive the `ScrollService` tests. This, in addition to the fact that we used a mock `ViewportScroller` which did not return the expected type from `getScrollPosition()`, caused errors to be thrown in unrelated tests (i.e. whenever a scroll event was emitted on `window`). See [here][1] for an example failure. This commit fixes it by adding an `ngOnDestroy()` method that unregisters the listeners and ensuring it is called after each `ScrollService` test. [1]: https://circleci.com/gh/angular/angular/381649 PR Close #31390
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.
Languages
TypeScript
68.6%
HTML
12.8%
JavaScript
8.4%
Pug
7%
Starlark
1.4%
Other
1.7%