Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amCalendar is broken #175

Closed
shahriar opened this issue Oct 11, 2017 · 2 comments
Closed

amCalendar is broken #175

shahriar opened this issue Oct 11, 2017 · 2 comments

Comments

@shahriar
Copy link

amCalendar crashes the app. I am using angular2-moment like this.

message.created_at | amCalendar:{sameDay:'h:mm A', sameElse:'DD/MM/YYYY'}
Last day I found this crashes the app with following stack trace.

ERROR TypeError: moment.isMoment is not a function at CalendarPipe.transform (calendar.pipe.js:39) at Object.eval [as updateRenderer] (ChatPage.ngfactory.js:347) at Object.updateRenderer (core.es5.js:12620) at checkAndUpdateView (core.es5.js:12149) at callViewAction (core.es5.js:12507) at execEmbeddedViewsAction (core.es5.js:12465) at checkAndUpdateView (core.es5.js:12145) at callViewAction (core.es5.js:12507) at execComponentViewsAction (core.es5.js:12439) at checkAndUpdateView (core.es5.js:12150)

Environment:

Please answer the following questions:

  • Angular version? 4.1.3
  • TypeScript version? 2.3.4
  • moment version? 2.19.0
  • Are you using moment-timezone? No
  • Are you using the angular-cli? Yes
  • Using Rollup/Webpack/System.js/Ionic/similar? Ionic
@blacksmith77
Copy link

blacksmith77 commented Oct 11, 2017

moment 2.19.0 has breaking changes for angular2-moment
moment 2.18.1 is good.

Workaround: pin "moment": "2.18.1" in your package.json

@lonwi
Copy link

lonwi commented Oct 12, 2017

It works fine with latest moment 2.19.1 just in case

@shahriar shahriar closed this as completed Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants