Using popover options: Cannot set property 'component' of null


#1

I’m using ionic popover.
This worked well till I tried to use PopoverOptions param. When I use this param it throw exception which I can see at console: “Cannot set property ‘component’ of null”.

See my code:

TypeScript - host page:

 message(item: ItemSliding) {
   var options :PopoverOptions = {cssClass:"popupSize"};
    let popover = this.popoverCtrl.create(MessagePage, null, options);
    popover.present();
    item.close();
}

TypeScript - popup page:

  import { Utility } from '../../../shared/utility'
  import { Component } from '@angular/core';

  @Component({
       templateUrl: "message.html"
  })

  export class MessagePage {

      constructor(public utility: Utility) { }
  }

scss of popup page:

.popupSize{
height: 90%;
width:90%;
}