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

parsing of template issue: ${moment().toISOString()} does not work #760

Open
bebor opened this issue Aug 28, 2019 · 1 comment
Open

parsing of template issue: ${moment().toISOString()} does not work #760

bebor opened this issue Aug 28, 2019 · 1 comment

Comments

@bebor
Copy link

bebor commented Aug 28, 2019

i get this error after upgrading

aurelia-framework version "aurelia-framework": "^1.3.1",

the view-model code:

import moment from 'moment'

export class ComponentX {
  constructor (router) {
    this.router = router
    this.moment = moment
}

then in view.html:
${moment()} -- works, return date as string
${moment().toISOString()} -- does not work. no method of moment can be called, it throws error:
moment() is not a function

when i downgrade to "aurelia-framework": "1.3.0" it works again.

@bigopon
Copy link
Member

bigopon commented Aug 29, 2019

@bebor can you help give a repro of the issue. As you can see from this sandbox https://codesandbox.io/s/readme-example-c1n2f

It's working fine with 1.3.1

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

2 participants