Skip to content

Date Pipe iOS Exception #8116

@danbucholtz

Description

@danbucholtz

IMPORTANT: This repository's issues are reserved for feature requests and bug reports. Do not submit support requests here, see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question.

Steps to reproduce and a minimal demo of the problem

  1. Run this plunkr in desktop Safari or Chrome and observe the full date being printed out
  2. Run the plunkr in mobile Safari or a cordova app and observe the exception thrown

What steps should we try in your demo to see the problem?

  1. Open plunkr in browser.
  2. See problem :)
  3. Go to edit mode in plunkr
  4. Open src/app.ts
  5. Note the assigning of new Date in constructor, and the template binding to the date and pushing into a date pipe.
//our root app component
import {Component} from 'angular2/core'

@Component({
  selector: 'my-app',
  providers: [],
  template: `
    <div>
      <h2>Todays date is: {{viewModel.date | date:'fullDate'}}</h2>
    </div>
  `,
  directives: []
})
export class App {
  constructor() {
    this.name = 'Angular2'
    this.viewModel = {};
    this.viewModel.date = new Date();
  }
}

Current behavior

Exception with thrown value: ReferenceError: Can't find variable: Intl

Expected/desired behavior

No exception occur

Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions