Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am filoxo on github.
  • I am filoxo (https://keybase.io/filoxo) on keybase.
  • I have a public key ASAidMmHxLikYVoxyJvRGa13T6rq6AtgEAzXjSFvrOz3dwo

To claim this, I am signing this object:

@filoxo
filoxo / fixedIonContent.js
Last active March 14, 2016 18:04
I have an element for an Ionic app that is larger than the standard `bar` and `bar-header` sizes (44px), and cannot be fixed height. I want this to appear above my body content but still that content to be scrollable. Other solutions didn't offer enough functionality so this is my implementation that worked. It gets the fixed element's height, a…
angular.module('fixedIonContent.directive', [])
.directive('fixedIonContent', function($timeout){
return {
restrict: 'A',
link: link
};
function link(_scope, element) {
var parent = angular.element(element[0].parentNode), // ion-view, usually
content = parent[0].getElementsByTagName('ion-content')[0]; // Should only ever be one
$timeout(function(){