21bc16d4d8
This commit reverts commit [_fix(service-worker): handle error with ErrorHandler_](https://github.com/angular/angular/pull/39990/commits/552419d). With Angular v11.0.4 and commit [_fix(service-worker): handle error with ErrorHandler_](https://github.com/angular/angular/pull/39990/commits/552419d) Angular start to send all service worker registration errors to the Angular standard `ErrorHandler#handleError()` interface, instead of logging them in the console. But users existing `ErrorHandler#handleError()` implementations are not adapted to service worker registration errors and it might result in broken apps or bad UI. Passing to `ErrorHandler` is desirable for some and undesirable for others and the same is true for passing to `console.error()`. But `console.error()` was used for a long time and thus it is preferable to keep it as long as a good solution is not found with `ErrorHandler`. Right now it's hard to define a good solution for `ErrorHandler` because: 1. Given the nature of the SW registration errors (usually outside the control of the developer, different error messages on each browser/version, often quite generic error messages, etc.), passing them to the `ErrorHandler` is not particularly helpful. 2. While `ErrorHandler#handleError()` accepts an argument of type `any` (so theoretically we could pass any object without changing the public API), most apps expect an `Error` instance, so many apps could break if we changed the shape. 3. Ideally, the Angular community want to re-think the `ErrorHandler` API and add support for being able to pass additional metadata for each error (such as the source of the error or some identifier, etc.). This change, however, could potentially affect many apps out there, so the community must put some thought into it and design it in a way that accounts for the needs of all packages (not just the SW). 4. Given that we want to more holistically revisit the `ErrorHandler` API, any changes we make in the short term to address the issue just for the SW will make it more difficult/breaky for people to move to a new API in the future. To see the whole explanation see GitHub PR #40236. PR Close #40236 |
||
---|---|---|
.circleci | ||
.devcontainer | ||
.github | ||
.husky | ||
.ng-dev | ||
.vscode | ||
.yarn | ||
aio | ||
dev-infra | ||
docs | ||
goldens | ||
integration | ||
modules | ||
packages | ||
scripts | ||
third_party | ||
tools | ||
.bazelignore | ||
.bazelrc | ||
.bazelversion | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gitmessage | ||
.mailmap | ||
.nvmrc | ||
.pullapprove.yml | ||
.yarnrc | ||
BUILD.bazel | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
WORKSPACE | ||
browser-providers.conf.js | ||
gulpfile.js | ||
karma-js.conf.js | ||
package.json | ||
test-events.js | ||
test-main.js | ||
tslint.json | ||
yarn.lock | ||
yarn.lock.readme.md |
README.md
Angular - One framework. Mobile & desktop.
Angular is a development platform for building mobile and desktop web applications
using Typescript/JavaScript and other languages.
Contributing Guidelines
·
Submit an Issue
·
Blog
Documentation
Get started with Angular, learn the fundamentals and explore advanced topics on our documentation website.
Advanced
Development Setup
Prerequisites
- Install Node.js which includes Node Package Manager
Setting Up a Project
Install the Angular CLI globally:
npm install -g @angular/cli
Create workspace:
ng new [PROJECT NAME]
Run the application:
cd [PROJECT NAME]
ng serve
Angular is cross-platform, fast, scalable, has incredible tooling, and is loved by millions.
Quickstart
Ecosystem
Changelog
Learn about the latest improvements.
Upgrading
Check out our upgrade guide to find out the best way to upgrade your project.
Contributing
Contributing Guidelines
Read through our contributing guidelines to learn about our submission process, coding rules and more.
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.
Code of Conduct
Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.
Community
Join the conversation and help the community.
Love Angular? Give our repo a star ⭐ ⬆️.