2017-05-26 15:28:06 -04:00
# Browser support
2017-03-31 19:57:13 -04:00
2017-02-22 13:09:39 -05:00
Angular supports most recent browsers. This includes the following specific versions:
< table >
< tr >
2018-01-30 15:56:20 -05:00
< th >
Browser
< / th >
2017-02-22 13:09:39 -05:00
2018-01-30 15:56:20 -05:00
< th >
Supported versions
< / th >
2017-02-22 13:09:39 -05:00
< / tr >
< tr >
< td >
2018-01-30 15:56:20 -05:00
Chrome
2017-02-22 13:09:39 -05:00
< / td >
< td >
latest
< / td >
2018-01-30 15:56:20 -05:00
< / tr >
2017-02-22 13:09:39 -05:00
2018-01-30 15:56:20 -05:00
< tr >
2017-02-22 13:09:39 -05:00
< td >
2018-01-30 15:56:20 -05:00
Firefox
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
latest
2017-02-22 13:09:39 -05:00
< / td >
< / tr >
< tr >
< td >
2018-01-30 15:56:20 -05:00
Edge
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
2 most recent major versions
2017-02-22 13:09:39 -05:00
< / td >
2018-01-30 15:56:20 -05:00
< / tr >
< tr >
2017-02-22 13:09:39 -05:00
< td >
2018-01-30 15:56:20 -05:00
IE
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
11< br > 10< br > 9
2017-02-22 13:09:39 -05:00
< / td >
2018-01-30 15:56:20 -05:00
< / tr >
< tr >
< tr >
2017-02-22 13:09:39 -05:00
< td >
2018-01-30 15:56:20 -05:00
IE Mobile
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
11
2017-02-22 13:09:39 -05:00
< / td >
2018-01-30 15:56:20 -05:00
< / tr >
< tr >
2017-02-22 13:09:39 -05:00
< td >
2018-01-30 15:56:20 -05:00
Safari
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
2 most recent major versions
2017-02-22 13:09:39 -05:00
< / td >
< / tr >
< tr >
< td >
2018-01-30 15:56:20 -05:00
iOS
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
2 most recent major versions
2017-02-22 13:09:39 -05:00
< / td >
2018-01-30 15:56:20 -05:00
< / tr >
< tr >
2017-02-22 13:09:39 -05:00
< td >
2018-01-30 15:56:20 -05:00
Android
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
Nougat (7.0)< br > Marshmallow (6.0)< br > Lollipop (5.0, 5.1)< br > KitKat (4.4)
2017-02-22 13:09:39 -05:00
< / td >
2018-01-30 15:56:20 -05:00
< / tr >
2017-02-22 13:09:39 -05:00
< / table >
2018-07-19 18:00:08 -04:00
< div class = "alert is-helpful" >
2017-03-27 11:08:53 -04:00
2017-07-26 06:42:38 -04:00
Angular's continuous integration process runs unit tests of the framework on all of these browsers for every pull request,
using < a href = "https://saucelabs.com/" > SauceLabs< / a > and
2017-04-24 14:23:45 -04:00
< a href = "https://www.browserstack.com" > Browserstack< / a > .
2017-03-27 11:08:53 -04:00
2017-04-10 11:51:13 -04:00
< / div >
2017-03-27 11:08:53 -04:00
2017-03-31 19:57:13 -04:00
2017-11-02 17:29:59 -04:00
## Polyfills
2017-03-31 19:57:13 -04:00
2017-02-22 13:09:39 -05:00
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.
2017-11-02 17:29:59 -04:00
You compensate by loading polyfill scripts ("polyfills") for the browsers that you must support.
The [table below ](#polyfill-libs ) identifies most of the polyfills you might need.
2017-02-22 13:09:39 -05:00
2017-11-02 17:29:59 -04:00
< div class = "alert is-important" >
2017-03-27 11:08:53 -04:00
2017-11-02 17:29:59 -04:00
The suggested polyfills are the ones that run full Angular applications.
You may need additional polyfills to support features not covered by this list.
Note that polyfills cannot magically transform an old, slow browser into a modern, fast one.
2017-02-22 13:09:39 -05:00
2017-11-02 17:29:59 -04:00
< / div >
2017-03-31 19:57:13 -04:00
2017-11-02 17:29:59 -04:00
## Enabling polyfills
2017-03-31 19:57:13 -04:00
2018-10-16 16:20:56 -04:00
[Angular CLI ](cli ) users enable polyfills through the `src/polyfills.ts` file that
2017-11-02 17:29:59 -04:00
the CLI created with your project.
2017-02-22 13:09:39 -05:00
2017-11-02 17:29:59 -04:00
This file incorporates the mandatory and many of the optional polyfills as JavaScript `import` statements.
2017-02-22 13:09:39 -05:00
2018-01-17 15:56:04 -05:00
The npm packages for the _mandatory_ polyfills (such as `zone.js` ) were installed automatically for you when you created your project and their corresponding `import` statements are ready to go. You probably won't touch these.
2017-02-22 13:09:39 -05:00
2018-01-30 15:56:20 -05:00
But if you need an optional polyfill, you'll have to install its npm package.
For example, [if you need the web animations polyfill ](http://caniuse.com/#feat=web-animation ), you could install it with `npm` , using the following command (or the `yarn` equivalent):
2017-02-22 13:09:39 -05:00
2017-11-02 17:29:59 -04:00
< code-example language = "sh" class = "code-shell" >
2018-02-08 18:01:43 -05:00
# note that the web-animations-js polyfill is only here as an example
# it isn't a strict requirement of Angular anymore (more below)
2017-11-02 17:29:59 -04:00
npm install --save web-animations-js
< / code-example >
2017-03-31 19:57:13 -04:00
2018-01-17 15:56:04 -05:00
Then open the `polyfills.ts` file and un-comment the corresponding `import` statement as in the following example:
2017-03-31 19:57:13 -04:00
2018-10-11 07:29:59 -04:00
< code-example header = "src/polyfills.ts" >
2017-11-02 17:29:59 -04:00
/**
* Required to support Web Animations `@angular/platform-browser/animations` .
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
** /
import 'web-animations-js'; // Run `npm install --save web-animations-js` .
< / code-example >
2017-02-22 13:09:39 -05:00
2018-01-17 15:56:04 -05:00
If you can't find the polyfill you want in `polyfills.ts` ,
2017-11-02 17:29:59 -04:00
add it yourself, following the same pattern:
2017-02-22 13:09:39 -05:00
2017-11-02 17:29:59 -04:00
1. install the npm package
1. `import` the file in `polyfills.ts`
2018-07-19 18:00:08 -04:00
< div class = "alert is-helpful" >
2017-02-22 13:09:39 -05:00
2017-11-02 17:29:59 -04:00
Non-CLI users should follow the instructions [below ](#non-cli ).
< / div >
2017-03-31 19:57:13 -04:00
2017-11-02 17:29:59 -04:00
{@a polyfill-libs}
2017-03-31 19:57:13 -04:00
2017-11-02 17:29:59 -04:00
### Mandatory polyfills
2017-02-22 13:09:39 -05:00
These are the polyfills required to run an Angular application on each supported browser:
2017-03-30 15:04:18 -04:00
2017-02-22 13:09:39 -05:00
< table >
< tr style = "vertical-align: top" >
2017-07-26 06:42:38 -04:00
2017-02-22 13:09:39 -05:00
< th >
2017-04-18 19:29:55 -04:00
Browsers (Desktop & Mobile)
2017-02-22 13:09:39 -05:00
< / th >
< th >
2017-04-18 19:29:55 -04:00
Polyfills Required
2017-02-22 13:09:39 -05:00
< / th >
< / tr >
< tr style = "vertical-align: top" >
2017-07-26 06:42:38 -04:00
2017-02-22 13:09:39 -05:00
< td >
Chrome, Firefox, Edge, Safari 9+
< / td >
< td >
2018-01-30 15:56:20 -05:00
2017-11-02 17:29:59 -04:00
[ES7/reflect ](guide/browser-support#core-es7-reflect ) (JIT only)
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< / tr >
< tr style = "vertical-align: top" >
2017-07-26 06:42:38 -04:00
2017-02-22 13:09:39 -05:00
< td >
Safari 7 & 8, IE10 & 11, Android 4.1+
< / td >
< td >
2018-01-30 15:56:20 -05:00
2017-03-11 10:36:40 -05:00
[ES6 ](guide/browser-support#core-es6 )
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< / tr >
< tr style = "vertical-align: top" >
2017-07-26 06:42:38 -04:00
2017-02-22 13:09:39 -05:00
< td >
IE9
< / td >
< td >
2018-01-30 15:56:20 -05:00
2017-03-31 19:57:13 -04:00
[ES6<br>classList ](guide/browser-support#classlist )
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< / tr >
< / table >
2017-03-31 19:57:13 -04:00
2017-11-02 17:29:59 -04:00
### Optional browser features to polyfill
2017-03-31 19:57:13 -04:00
2017-02-22 13:09:39 -05:00
Some features of Angular may require additional polyfills.
2018-02-08 18:01:43 -05:00
For example, the animations library relies on the standard web animation API, which is only available in Chrome and Firefox today.
(note that the dependency of web-animations-js in Angular is only necessary if `AnimationBuilder` is used.)
2017-02-22 13:09:39 -05:00
Here are the features which may require additional polyfills:
2017-03-30 15:04:18 -04:00
2017-02-22 13:09:39 -05:00
< table >
< tr style = "vertical-align: top" >
2017-07-26 06:42:38 -04:00
2017-02-22 13:09:39 -05:00
< th >
Feature
< / th >
< th >
Polyfill
< / th >
< th style = "width: 50%" >
2017-04-18 19:29:55 -04:00
Browsers (Desktop & Mobile)
2017-02-22 13:09:39 -05:00
< / th >
< / tr >
2017-11-02 17:29:59 -04:00
< tr style = "vertical-align: top" >
< td >
2018-01-30 15:56:20 -05:00
2018-01-17 15:56:04 -05:00
[JIT compilation ](guide/aot-compiler ).
2018-01-30 15:56:20 -05:00
2017-11-02 17:29:59 -04:00
Required to reflect for metadata.
< / td >
< td >
2018-01-30 15:56:20 -05:00
2017-11-02 17:29:59 -04:00
[ES7/reflect ](guide/browser-support#core-es7-reflect )
2018-01-30 15:56:20 -05:00
2017-11-02 17:29:59 -04:00
< / td >
< td >
2018-01-17 15:56:04 -05:00
All current browsers. Enabled by default.
Can remove if you always use AOT and only use Angular decorators.
2017-11-02 17:29:59 -04:00
< / td >
< / tr >
2017-02-22 13:09:39 -05:00
< tr style = "vertical-align: top" >
2017-07-26 06:42:38 -04:00
2017-02-22 13:09:39 -05:00
< td >
2018-01-30 15:56:20 -05:00
2017-04-30 16:10:32 -04:00
[Animations ](guide/animations )
2018-02-08 18:01:43 -05:00
< br > Only if `Animation Builder` is used within the application--standard
animation support in Angular doesn't require any polyfills (as of NG6).
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
2017-03-11 10:36:40 -05:00
[Web Animations ](guide/browser-support#web-animations )
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-02-08 18:01:43 -05:00
< p > If AnimationBuilder is used then the polyfill will enable scrubbing
support for IE/Edge and Safari (Chrome and Firefox support this natively).< / p >
2017-02-22 13:09:39 -05:00
< / td >
< / tr >
< tr style = "vertical-align: top" >
2017-04-30 16:10:32 -04:00
2017-02-22 13:09:39 -05:00
< td >
2018-01-30 15:56:20 -05:00
If you use the following deprecated i18n pipes:
[date ](api/common/DeprecatedDatePipe ),
[currency ](api/common/DeprecatedCurrencyPipe ),
[decimal ](api/common/DeprecatedDecimalPipe ),
[percent ](api/common/DeprecatedPercentPipe )
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
2017-03-11 10:36:40 -05:00
[Intl API ](guide/browser-support#intl )
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
All but Chrome, Firefox, Edge, IE11 and Safari 10
< / td >
< / tr >
< tr style = "vertical-align: top" >
2017-07-26 06:42:38 -04:00
2017-02-22 13:09:39 -05:00
< td >
2018-01-30 15:56:20 -05:00
[NgClass ](api/common/NgClass )
on SVG elements
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
2017-03-31 19:57:13 -04:00
[classList ](guide/browser-support#classlist )
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
IE10, IE11
< / td >
< / tr >
< tr style = "vertical-align: top" >
2017-07-26 06:42:38 -04:00
2017-02-22 13:09:39 -05:00
< td >
2018-01-30 15:56:20 -05:00
[Http ](guide/http )
when sending and receiving binary data
2017-02-22 13:09:39 -05:00
< / td >
< td >
2018-01-30 15:56:20 -05:00
2017-07-26 06:42:38 -04:00
[Typed Array ](guide/browser-support#typedarray )< br >
2018-01-30 15:56:20 -05:00
2017-07-26 06:42:38 -04:00
[Blob ](guide/browser-support#blob )< br >
2018-01-30 15:56:20 -05:00
2017-07-26 06:42:38 -04:00
[FormData ](guide/browser-support#formdata )
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
IE 9
< / td >
< / tr >
< / table >
2017-03-31 19:57:13 -04:00
2017-02-22 13:09:39 -05:00
### Suggested polyfills ##
2017-07-26 06:42:38 -04:00
Below are the polyfills which are used to test the framework itself. They are a good starting point for an application.
2017-02-22 13:09:39 -05:00
2017-03-30 15:04:18 -04:00
2017-02-22 13:09:39 -05:00
< table >
< tr >
< th >
Polyfill
< / th >
< th >
2017-03-11 08:44:25 -05:00
License
2017-02-22 13:09:39 -05:00
< / th >
< th >
Size*
< / th >
< / tr >
2017-11-02 17:29:59 -04:00
< tr >
< td >
2018-01-30 15:56:20 -05:00
2017-11-02 17:29:59 -04:00
< a id = 'core-es7-reflect' href = "https://github.com/zloirock/core-js/blob/master/es7/reflect.js" > ES7/reflect< / a >
2018-01-30 15:56:20 -05:00
2017-11-02 17:29:59 -04:00
< / td >
< td >
MIT
< / td >
< td >
0.5KB
< / td >
< / tr >
2017-02-22 13:09:39 -05:00
< tr >
< td >
2018-01-30 15:56:20 -05:00
2017-04-24 14:23:45 -04:00
< a id = 'core-es6' href = "https://github.com/zloirock/core-js" > ES6< / a >
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
MIT
< / td >
< td >
27.4KB
< / td >
< / tr >
< tr >
< td >
2018-01-30 15:56:20 -05:00
2017-04-24 14:23:45 -04:00
< a id = 'classlist' href = "https://github.com/eligrey/classList.js" > classList< / a >
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
Public domain
< / td >
< td >
1KB
< / td >
< / tr >
< tr >
< td >
2018-01-30 15:56:20 -05:00
2017-04-24 14:23:45 -04:00
< a id = 'intl' href = "https://github.com/andyearnshaw/Intl.js" > Intl< / a >
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
2017-03-11 08:44:25 -05:00
MIT / Unicode license
2017-02-22 13:09:39 -05:00
< / td >
< td >
13.5KB
< / td >
< / tr >
< tr >
< td >
2018-01-30 15:56:20 -05:00
2017-04-24 14:23:45 -04:00
< a id = 'web-animations' href = "https://github.com/web-animations/web-animations-js" > Web Animations< / a >
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
Apache
< / td >
< td >
14.8KB
< / td >
< / tr >
< tr >
< td >
2018-01-30 15:56:20 -05:00
2017-04-24 14:23:45 -04:00
< a id = 'typedarray' href = "https://github.com/inexorabletash/polyfill/blob/master/typedarray.js" > Typed Array< / a >
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
MIT
< / td >
< td >
4KB
< / td >
< / tr >
< tr >
< td >
2018-01-30 15:56:20 -05:00
2017-04-24 14:23:45 -04:00
< a id = 'blob' href = "https://github.com/eligrey/Blob.js" > Blob< / a >
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
MIT
< / td >
< td >
1.3KB
< / td >
< / tr >
< tr >
< td >
2018-01-30 15:56:20 -05:00
2017-04-24 14:23:45 -04:00
< a id = 'formdata' href = "https://github.com/francois2metz/html5-formdata" > FormData< / a >
2018-01-30 15:56:20 -05:00
2017-02-22 13:09:39 -05:00
< / td >
< td >
MIT
< / td >
< td >
0.4KB
< / td >
< / tr >
< / table >
2017-03-31 19:57:13 -04:00
2017-07-26 06:42:38 -04:00
\* Figures are for minified and gzipped code,
2017-04-24 14:23:45 -04:00
computed with the < a href = "http://closure-compiler.appspot.com/home" > closure compiler< / a > .
2017-11-02 17:29:59 -04:00
{@a non-cli}
## Polyfills for non-CLI users
2018-01-30 15:56:20 -05:00
If you are not using the CLI, you should add your polyfill scripts directly to the host web page (`index.html`), perhaps like this.
2017-11-02 17:29:59 -04:00
2018-10-11 07:29:59 -04:00
< code-example header = "src/index.html" >
2017-11-02 17:29:59 -04:00
< !-- pre-zone polyfills -->
< script src="node_modules/core-js/client/shim.min.js">< /script>
< script src="node_modules/web-animations-js/web-animations.min.js">< /script>
2018-01-22 11:43:30 -05:00
< 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__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
2017-11-02 17:29:59 -04:00
2018-01-26 23:45:03 -05:00
/*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
// __Zone_enable_cross_context_check = true;
< /script>
2017-11-02 17:29:59 -04:00
< !-- zone.js required by Angular -->
< script src="node_modules/zone.js/dist/zone.js">< /script>
< !-- application polyfills -->
< / code-example >