Ember.js v0.9.7.1

http://stackoverflow.com/questions/10644229/how-to-show-hide-a-view-in-emberjs

by stevenng

HTML

<script src="https://github.com/downloads/emberjs/ember.js/ember-0.9.7.1.js"></script>
<script type="text/x-handlebars" >
    {{#view App.parentView}}
        <h1>Parent</h1>
    <div><a href="#" {{action "toggle"}}>hide/show</a></div>     
        {{#view App.childView}}
            {{view Em.TextArea rows="2" cols="20"}}
        {{/view}}        
    {{/view}}
</script>

JavaScript

App = Ember.Application.create({});

App.parentView = Em.View.extend({   
    click: function() {
        App.childView.set('isVisible', true);
    },
    toggle: function(){
        App.childView.set('isVisible', true);
    }
});

App.childView = Em.View.extend({
  isVisible: false
});