8c939dcb40
Before #41162, angular.io was broken on IE 11 due to missing a polyfill for an API (`Reflect.construct()`) needed by the Custom Elements ES5 shim. #41162 tried to fix this by loading the necessary polyfill (`es.reflect.construct.js`) on browsers that do not support ES2015 modules (including IE 11). It turns out that the fix in #41162 was itself broken, because the `es.reflect.consruct.js` script (included directly in the page via a `<script>` tag) was in CommonJS format (which cannot run in the browser as is). By chance, this still allowed browsers that supported neither Custom Elements nor ES2015 modules (such as IE 11) to work correctly as a side-effect of loading the `@webcomponents/custom-elements` polyfill after the Custom Elements ES5 shim (`native-shim.js`). However, on the few browsers that natively support Custom Elements but not ES2015 modules, angular.io would still be broken. This commit correctly fixes angular.io on all browsers by properly bundling the polyfills and transpiling to ES5. Implementation-wise, we use [esbuild][1] for bundling the polyfills (and converting from CommonJS to a browser-compatible, IIFE-based format) and [swc][2] for downleveling the code to ES5 (since `esbuild` only supports ES2015+). [1]: https://esbuild.github.io/ [2]: https://swc.rs/ PR Close #41183 |
||
---|---|---|
.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 ⭐ ⬆️.