Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

date pipe issue on IE10 - 'Intl' is undefined

Tags:

I have the following simple example that uses the Angular 2 date pipe which works fine in IE11 but fails on IE10:

@Component({
  selector: 'my-app',
  template: 'my date: {{ myDate | date }}'
})
export class AppComponent {
  myDate: Date = new Date();
}

One IE10, it errors out with 'Intl' is undefined. The shim was properly loaded just like the quickstart example.

Here's the plunker - http://plnkr.co/edit/rJIAay1mRXnnFtNvmM7x?p=preview

If you turn on IE10 emulation mode in the F12 tool then the error occurs. How do I get around this issue on the IE10 browser?

like image 587
Niner Avatar asked Nov 01 '16 20:11

Niner


1 Answers

The (only) reasonable explanation is that Intl isn't polyfilled.

As core-js documentation states,

ECMA-402 Intl is missed because of size. You can use this polyfill.

like image 148
Estus Flask Avatar answered Sep 24 '22 16:09

Estus Flask