ember.js - How can you tell if an Ember view's element is in the document? -
how can tell ember view's element has been inserted document?
my current method do:
if (this.$().length) { // ... }
another solution checking dictionary of views. if have view like:
var helloview = em.view.create({ elementid: 'hello' });
you can do:
var myview = ember.view.views.hello; // check if in dom myview.get('state') === "indom"; // check if visible myview.get('isvisible');
Comments
Post a Comment