How to remove white space created after hiding navbar?

Tried to do this, with #content on ion-header of C (and tested also on both C and AB) but it didn’t work.

import { Component, ViewChild } from '@angular/core';
import { Content } from 'ionic-angular';

@Component({...})
export class MyPage{
  @ViewChild(Content) content: Content;

ionViewDidEnter(){
    this.content.resize();
}