Skip to content

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

Description

@bebor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions