The Wayback Machine - https://web.archive.org/web/20250305093706/https://github.com/NativeScript/NativeScript/issues/6727
Skip to content

Can not use nested object method in expression for binding #6727

Open
@webleaf

Description

Environment

  • CLI: 5.0.1
  • Cross-platform modules: 5.0.5
  • Android Runtime: 5.0.0
  • iOS Runtime: not installed

To Reproduce

class ViewModel extends Observable {
    public obj = {
        fun: function () {
            return "It's fun()"
        }
    }
}

const vm = new ViewModel();
<Label text="{{ obj.fun() }}"/>
Binding: Run-time error occured in file: undefined at line: undefined and column: undefined

Same result if it used, as ListView item bindingContext.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions