title: Did you add it to @NgModule.entryComponents?
body: <pre class="lang-js prettyprint-override"><code>import {Component} from '@angular/core';
  import {IonicPage, NavController, NavParams} from 'ionic-angular';
  import {Dashboard} from '../dashboard/dashboard'
  import {EventPlan} from '../event-plan/event-plan'
  import {EmployeeList} from '../../providers/employee-list'
  import {GoalActionDashboard} from '../../providers/goal-action-dashboard'
  
  @IonicPage()
  @Component({
    selector: 'page-service-requirement-form',
    templateUrl: 'service-requirement-form.html',
  })
  export class ServiceRequirementForm {
    eventPlan() {
      this.navCtrl.setRoot(EventPlan);
    }
  }
  </code></pre>
  
  <p>Here I want to go to another page o'clock button. In my html-page, I have a button where I declared a function named eventPlan(). But this is not working. It throws the following error:</p>
  
  <pre><code>No component factory found. Did you add it to @NgModule.entryComponents
  </code></pre>
  
  <p>How can I fix this error?</p>