{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/11896","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/11896/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/11896/comments","events_url":"https://api.github.com/repos/angular/angular/issues/11896/events","html_url":"https://github.com/angular/angular/issues/11896","id":179063660,"number":11896,"title":"Date Pipe fails at run-time after AOT compilation","user":{"login":"yepuv1","id":3055757,"avatar_url":"https://avatars.githubusercontent.com/u/3055757?v=3","gravatar_id":"","url":"https://api.github.com/users/yepuv1","html_url":"https://github.com/yepuv1","followers_url":"https://api.github.com/users/yepuv1/followers","following_url":"https://api.github.com/users/yepuv1/following{/other_user}","gists_url":"https://api.github.com/users/yepuv1/gists{/gist_id}","starred_url":"https://api.github.com/users/yepuv1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yepuv1/subscriptions","organizations_url":"https://api.github.com/users/yepuv1/orgs","repos_url":"https://api.github.com/users/yepuv1/repos","events_url":"https://api.github.com/users/yepuv1/events{/privacy}","received_events_url":"https://api.github.com/users/yepuv1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-25T02:28:42Z","updated_at":"2016-09-25T02:30:53Z","closed_at":null,"body":"**I'm submitting a ...**  (check one with \"x\")\r\n```\r\n[x] bug report => search github for a similar issue or PR before submitting\r\n[ ] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n**Current behavior** \r\nWhen compiled with ngc, the Date Pipe fails at runtime. Here is the stack trace\r\nbuild.js:2 TypeError: Cannot convert undefined or null to object\r\n    at new DateTimeFormat (native)\r\n    at _e (http://localhost:3000/dist/build.js:1:21540)\r\n    at Object.yMMMd (http://localhost:3000/dist/build.js:1:22017)\r\n    at Oe (http://localhost:3000/dist/build.js:1:22086)\r\n    at Function.t.format (http://localhost:3000/dist/build.js:6:3734)\r\n    at t.transform (http://localhost:3000/dist/build.js:6:4065)\r\n    at http://localhost:3000/dist/build.js:1:9119\r\n    at e.detectChangesInternal (http://localhost:3000/dist/build.js:7:17240)\r\n    at e.t.detectChanges (http://localhost:3000/dist/build.js:5:5356)\r\n    at e.t.detectViewChildrenChanges (http://localhost:3000/dist/build.js:5:5904)\r\n<!-- Describe how the bug manifests. -->\r\n\r\n**Expected behavior**\r\nDate pipe must work in AOT as it worked in JIT compilation.\r\n<!-- Describe what the behavior would be without the bug. -->\r\n\r\n**Reproduction of the problem**\r\n\r\nCompiling the code below with ngc caused the error:\r\n\r\n` import { Component } from '@angular/core';\r\n\r\n@Component({\r\n  selector: 'my-app',\r\n  template: `<div>\r\n    <p>Today is {{today | date}}</p>\r\n    <p>Or if you prefer, {{today | date:'fullDate'}}</p>\r\n    <p>The time is {{today | date:'jmZ'}}</p>\r\n  </div>`\r\n})\r\nexport class AppComponent {\r\n  showHeading = true;\r\n  today:number = `Date.now();`\r\n}\r\n`\r\n<!-- If the current behavior is a bug or you can illustrate your feature request better with an example, \r\nThe problem can be reproduced by compiling the following code using ngc,\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\n<!-- Describe the motivation or the concrete use case -->\r\n\r\n**Please tell us about your environment:**\r\n<!-- Operating system, IDE, package manager, HTTP server, ... -->\r\nWindows 10, VSCode, npm, lite, tsc 2.0.2\r\n\r\n* **Angular version:** 2.0.X \r\n2.0.0\r\n<!-- Check whether this is still an issue in the most recent Angular version -->\r\n\r\n* **Browser:** [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] \r\n<!-- All browsers where this could be reproduced -->\r\n Chrome Version 53.0.2785.116 m (64-bit)\r\n* **Language:** [all | TypeScript X.X | ES6/7 | ES5]\r\n ES5\r\n* **Node (for AoT issues):** `node --version` =   \r\nv6.2.2"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/249398788","html_url":"https://github.com/angular/angular/issues/11896#issuecomment-249398788","issue_url":"https://api.github.com/repos/angular/angular/issues/11896","id":249398788,"user":{"login":"ericmartinezr","id":13039652,"avatar_url":"https://avatars.githubusercontent.com/u/13039652?v=3","gravatar_id":"","url":"https://api.github.com/users/ericmartinezr","html_url":"https://github.com/ericmartinezr","followers_url":"https://api.github.com/users/ericmartinezr/followers","following_url":"https://api.github.com/users/ericmartinezr/following{/other_user}","gists_url":"https://api.github.com/users/ericmartinezr/gists{/gist_id}","starred_url":"https://api.github.com/users/ericmartinezr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericmartinezr/subscriptions","organizations_url":"https://api.github.com/users/ericmartinezr/orgs","repos_url":"https://api.github.com/users/ericmartinezr/repos","events_url":"https://api.github.com/users/ericmartinezr/events{/privacy}","received_events_url":"https://api.github.com/users/ericmartinezr/received_events","type":"User","site_admin":false},"created_at":"2016-09-25T02:30:53Z","updated_at":"2016-09-25T02:30:53Z","body":"dup of https://github.com/angular/angular/issues/11643"}}
{"actor":{"display_login":"ericmartinezr"}}