the ion-content computes automatically the margin-top and/or the padding-top property.
With ionic 1, this could be simply achieved with: contentElem.style.top = 0;
With ionic 2, the ion-content overrides any provided value (via javascript or css):
this.ionContentElement.style.setProperty('margin-top', '0px', 'important'); //WON'T WORK
The fullscreen property could work but the initial margin is still the size of the header bar. I believe the fullscreen property with an extra value to set no margin is the correct solution. Especially, because of the Content.resize() function that rewrites these values.
var bar = document.getElementsByClassName("toolbar-background")[0];
bar.classList.add("transparent");
var content = document.getElementsByTagName("scroll-content")[1];
content.classList.add("no-margin-top");
Is this good enough for your application?
Gotta specify the number [0,1,…] of the element within your DOM.