Go to file
George Kalpakas 8c939dcb40 fix(docs-infra): fix angular.io on browsers that support Custom Elements but not ES2015 (#41183)
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
2021-03-12 13:22:57 -08:00
.circleci ci: run localize tests on windows (#40952) 2021-02-24 14:27:07 -08:00
.devcontainer build: update the recommended `Dockerfile` for VSCode remote development (#34697) 2020-01-09 13:31:14 -08:00
.github build: update the lock closed sha to the latest sha (#41140) 2021-03-09 13:24:50 -08:00
.husky build: update to husky@5 (#39739) 2020-11-18 11:11:41 -08:00
.ng-dev build: remove commit message max line length limit (#41157) 2021-03-10 11:05:43 -08:00
.vscode build: use "outFiles" in .vscode/launch.json to speed up debugging sessions (#39848) 2020-12-17 11:23:13 -08:00
.yarn build: update to yarn v1.22.10 (#40562) 2021-01-26 10:52:27 -08:00
aio fix(docs-infra): fix angular.io on browsers that support Custom Elements but not ES2015 (#41183) 2021-03-12 13:22:57 -08:00
dev-infra test(dev-infra): fix test order failure in tests for the release command (#41023) 2021-03-08 10:33:07 -08:00
docs docs: fix some typos in angular.io examples (#41093) 2021-03-05 15:08:11 -08:00
goldens fix(docs-infra): avoid unnecessarily loading Custom Elements ES5 shim (#41162) 2021-03-11 09:25:32 -08:00
integration feat(compiler): emit @__PURE__ or @pureOrBreakMyCode annotations in the generated code (#41096) 2021-03-08 10:30:08 -08:00
modules fix(dev-infra): update build tooling for latest changes in rules_nodejs (#40710) 2021-02-09 10:48:43 -08:00
packages fix(core): Switch `emitDistinctChangesOnlyDefaultValue` to true (#41121) 2021-03-12 10:47:56 -08:00
scripts ci: improve error message when payload size check fails (#41116) 2021-03-08 10:03:59 -08:00
third_party docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
tools fix(dev-infra): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
.bazelignore ci: add integration test for Angular Elemens with SSR (#40559) 2021-02-12 08:55:25 -08:00
.bazelrc build: update config flags for snapshot builds (#40095) 2020-12-15 13:36:56 -08:00
.bazelversion build: update .bazelversion (#40579) 2021-01-26 11:35:54 -08:00
.clang-format
.editorconfig build: use https link to editorconfig.org in .editorconfig (#27664) 2018-12-18 09:30:09 -08:00
.gitattributes test: fix ts api guardian and public guard tests on windows (#30105) 2019-04-26 16:32:22 -07:00
.gitignore fix(dev-infra): add vim .swp files to gitignore (#40094) 2020-12-14 11:39:41 -08:00
.gitmessage fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
.mailmap
.nvmrc build: migrate to node@12.14.1 (#34955) 2020-01-27 09:31:22 -08:00
.pullapprove.yml docs: add what is angular topic (#40811) 2021-02-17 11:13:21 -08:00
.yarnrc build: update to yarn v1.22.10 (#40562) 2021-01-26 10:52:27 -08:00
BUILD.bazel test(upgrade): run tests against AngularJS v1.8.x as well (#39972) 2020-12-07 09:40:49 -08:00
CHANGELOG.md release: cut the v12.0.0-next.4 release (#41156) 2021-03-10 10:03:45 -08:00
CODE_OF_CONDUCT.md docs: add Discord as an official communication channel (#39149) 2020-10-14 10:23:15 -07:00
CONTRIBUTING.md docs: add an exception for accepting contributions (#39611) 2020-11-24 08:40:22 -08:00
LICENSE docs: update the copyright notice date (#40707) 2021-02-16 10:04:23 -08:00
README.md docs: add Discord, YouTube, StackOverflow to the "Community" section in `README.md` (#41086) 2021-03-08 08:35:22 -08:00
WORKSPACE build: update to rules_nodejs@3.2.1 (#40972) 2021-02-24 08:00:03 -08:00
browser-providers.conf.js ci: remove IE 9 and IE 10 from CI (#38931) 2020-09-25 14:31:10 -04:00
gulpfile.js build: remove check-env script (#39980) 2020-12-07 09:48:11 -08:00
karma-js.conf.js test(core): tag `render3` test targets as ivy-only (#40127) 2021-01-06 08:28:03 -08:00
package.json release: cut the v12.0.0-next.4 release (#41156) 2021-03-10 10:03:45 -08:00
test-events.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test-main.js feat(platform-server): allow shimming the global env sooner (#40559) 2021-02-12 08:55:25 -08:00
tslint.json build: exclude build-worker file from formatting (#40012) 2020-12-08 12:06:53 -08:00
yarn.lock build: update to rules_nodejs@3.2.1 (#40972) 2021-02-24 08:00:03 -08:00
yarn.lock.readme.md build: remove travisci leftovers (#27979) 2019-01-09 10:41:16 -08:00

README.md

Angular - One framework. Mobile & desktop.

angular-logo
Angular is a development platform for building mobile and desktop web applications
using Typescript/JavaScript and other languages.

www.angular.io

Contributing Guidelines · Submit an Issue · Blog

CI status   Angular on npm   Discord conversation


Documentation

Get started with Angular, learn the fundamentals and explore advanced topics on our documentation website.

Advanced

Development Setup

Prerequisites

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

Get started in 5 minutes.

Ecosystem

angular ecosystem logos

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 badge

Love Angular? Give our repo a star ⬆️.