January 14, 2017

“Intl is not defined” with Angular 2

If you are using the date, currency, decimal or percent pipes in Angular 2 make sure to add the required Intl Polyfill to your application before you ship it to production. The Internationalization API is not yet implemented in all browser versions out there. If you forget this you’ll receive the Intl is not defined error in many browsers. Especially Internet Explorer 9 and 10. You can get a full overview at caniuse.com

Dependent on what features of Angular 2 are used, you actually might need some other polyfills. So make sure to check the browser support page on angular.io before you release your app to the web.

Following an example on how to add Intl Polyfill to angular-cli:

Update your polyfill.ts

Thats it!

Related Posts

Avatar photo

Admin Admin
Developer at thecodecampus </>


3 responses to ““Intl is not defined” with Angular 2”

  1. icgok says:

    wonderful

  2. Atreides says:

    Great!!!

  3. mr yang says:

    unbelievable

Leave a Reply

Add code to your comment in Markdown syntax.
Like this:
`inline example`

```
code block
example
```

Your email address will not be published.