Can't create a modal

SOLVED: The modal class was missing “export” (ie export class)

I’m having a problem when trying to load and present a modal in ionic 2. (i’ve shortened this code down a tad)

import {Page, NavController, Tabs, Storage, LocalStorage, Modal, Alert, NavParams} from 'ionic-angular';
import {TandCs} from '../termsandconditions'

  templateUrl: 'build/pages/home/home.html'
export class Home {
    static get parameters() {
     return [[NavController],[Tabs],[Language]];

    constructor(nav, tabs, language) {

      this.nav = nav;


    onPageDidEnter() {
        var tandcs = Modal.create(TandCs);

and my modal page…
import {ViewController, Page} from ‘ionic-angular’;
import {Language} from ‘…/langservice’;

  template: `
  <ion-buttons start>
    <button (click)="dismiss()">
      <span primary showWhen="ios">Cancel</span>
      <ion-icon name="md-close" showWhen="android,windows"></ion-icon>

<ion-content class="has-header">
class TandCs {

    static get parameters() {
        return [[ViewController], [Language]];
    constructor(viewCtrl, language) {
        this.viewCtrl = viewCtrl;
        this.lang = language;
        this.language = { terms:  language.getTerm("Title, Terms and conditions 1") }

    close() {

But this returns the following exception…

 EXCEPTION: TypeError: Cannot read property 'annotations' of undefined

Any help will be greatly appreciated! Thank you!

that should be this?

Hmm, I’m not seeing an error in my tests.

Sorry that ‘that’ was left over from a setTimeout wrapper

@Colin Which version of the Ionic framework are you using? Is the exception thrown when showing the modal or when closing it? I had a similar problem before but it was fixed in beta.3.

Hey, it’s b.4 but I have solved this issue - the modal class must be exported