Skip to content

Calling methods inside of data() is not allowed in 2.x? #4302

@tzurbaev

Description

@tzurbaev

Vue.js version

2.1.0

Reproduction Link

http://jsfiddle.net/ds8o0kry/

Steps to reproduce

Call any method inside of data() function

What is Expected?

Method should be called (just like in 1.x)

What is actually happening?

Uncaught TypeError: %method% is not a function is thrown

We are migrating from vue 1.0.28 to 2.x and seems that data() behaviour changed but there's no info in migration guide, vue-migration-helper also says nothing about this. Is this a bug or possibility of calling methods inside data() was removed?

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