Skip to content

Ready hook is not called when used together with v-if #561

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

Closed
jsedlacek opened this issue Nov 14, 2014 · 0 comments
Closed

Ready hook is not called when used together with v-if #561

jsedlacek opened this issue Nov 14, 2014 · 0 comments
Labels

Comments

@jsedlacek
Copy link

When I create a component using v-component directive together with v-if the ready hook is not called.

var ready = spy();
var parent = new Vue({
  template: '<user-profile v-if="showProfile"></user-profile>',
  data: {
    showProfile: false
  },
  components: {
    'user-profile': {
      template: 'User Profile...',
      ready: ready
    }
  }
})
parent.$mount()
parent.$appendTo(document.body)
parent.showProfile = true;

Vue.nextTick(function() {
  assert(ready.called);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants