Skip to content

Instantly share code, notes, and snippets.

@tyaslab
Created March 29, 2015 16:44
Show Gist options
  • Save tyaslab/3204d6bf614d673193ad to your computer and use it in GitHub Desktop.
Save tyaslab/3204d6bf614d673193ad to your computer and use it in GitHub Desktop.
Angular Close Topbar after changing route
app.run(['$rootScope', '$location', function($rootScope, $location) {
$rootScope.$watch(function() {
return $location.path();
}, function(a) {
$(document).foundation();
$rootScope.flash_messages = [];
// FIX TOP BAR EXPANSION
$('.top-bar').removeClass('expanded').css({
height: ''
});
});
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment