user1589906
user1589906

Reputation:

How to hide a view in Ember.js

Forgive me if this question is too silly or already asked I googled a lot but I did't get the correct answer. I need to hide one of my view but how can i do that my current code is given below

var view = pointer.getPath('parentView.previewImageView');
view.set('IsVisible', false);

Upvotes: 0

Views: 788

Answers (1)

Mike Grassotti
Mike Grassotti

Reputation: 19050

Should work if you use isVisible instead of IsVisible. For example:

App = Ember.Application.create({});
App.ApplicationView = Ember.View.extend({
    hide: function() {
        this.set('isVisible', false);
        Ember.run.later(this, function() {
            this.set('isVisible', true);
        }, 1000);
    }  
});

Live example here: http://jsfiddle.net/mgrassotti/6ddPQ/2/

Upvotes: 2

Related Questions