Skip to content

Instantly share code, notes, and snippets.

@alonextou
Created September 5, 2013 05:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alonextou/6446390 to your computer and use it in GitHub Desktop.
Save alonextou/6446390 to your computer and use it in GitHub Desktop.
App.ApplicationController = Ember.Controller.extend({
hideHeader: false,
observePath: function() {
if (this.get('currentPath') !== 'index') {
this.set('hideHeader', true);
$('#header').slideUp();
} else {
this.set('hideHeader', false);
$('#header').slideDown();
}
}.observes('currentPath')
});
{{#unless hideHeader}}
<div id="header">
{{partial upper}}
</div>
{{/unless}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment