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!


Can Kattwinkel

Entwickler bei thecodecampus

Comments (1)

Leave a Reply

Your email address will not be published. Required fields are marked *