W3cubDocs

/Angular

Browser support

Angular supports most recent browsers. This includes the following specific versions:

Browser Supported versions
Chrome 2 most recent versions
Firefox latest and extended support release (ESR)
Edge 2 most recent major versions
Safari 2 most recent major versions
iOS 2 most recent major versions
Android 2 most recent major versions

Angular's continuous integration process runs unit tests of the framework on all of these browsers for every pull request, using Sauce Labs.

Polyfills

Angular is built on the latest standards of the web platform. Targeting such a wide range of browsers is challenging because they do not support all features of modern browsers. You compensate by loading polyfill scripts ("polyfills") for the browsers that you must support. See instructions on how to include polyfills into your project below.

The suggested polyfills are the ones that run full Angular applications. You might need additional polyfills to support features not covered by this list.

NOTE: Polyfills cannot magically transform an old, slow browser into a modern, fast one.

Enabling polyfills with CLI projects

The Angular CLI provides support for polyfills. If you are not using the CLI to create your projects, see Polyfill instructions for non-CLI users.

The polyfills options of the browser and test builder can be a full path for a file (Example: src/polyfills.ts) or, relative to the current workspace or module specifier (Example: zone.js).

If you create a TypeScript file, make sure to include it in the files property of your tsconfig file.

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    ...
  },
  "files": [
    "src/main.ts",
    "src/polyfills.ts"
  ]
  ...
}

Polyfills for non-CLI users

If you are not using the CLI, add your polyfill scripts directly to the host web page (index.html).

For example:

<!-- pre-zone polyfills -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script>
  /**
   * you can configure some zone flags which can disable zone interception for some
   * asynchronous activities to improve startup performance - use these options only
   * if you know what you are doing as it could result in hard to trace down bugs.
   */
  // __Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
  // __Zone_disable_on_property = true; // disable patch onProperty such as onclick
  // __zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
  /*
   * in Edge developer tools, the addEventListener will also be wrapped by zone.js
   * with the following flag, it will bypass `zone.js` patch for Edge.
   */
  // __Zone_enable_cross_context_check = true;
</script>
<!-- zone.js required by Angular -->
<script src="node_modules/zone.js/bundles/zone.umd.js"></script>
<!-- application polyfills -->
Last reviewed on Fri Nov 04 2022

© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/guide/browser-support