Component Constructor being called twice

  1. I have an Ionic2 App created using Beta10.

  2. I have created a custom component(seat-plan.ts) as follows:

    import { Component} from ‘@angular/core’;
    import { NavController } from ‘ionic-angular’;

    @Component({
    selector:‘seat-map’,
    templateUrl: ‘build/components/seating-plan/seating-plan.html’,
    })
    export class SeatingPlan {

    constructor(nav: NavController)
    {
    console.log(“Constructor”);
    }

    }

  3. I am then calling the component from a main page

import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import {SeatingPlan} from ‘…/…/components/seating-plan/seating-plan’;

@Component({
templateUrl: ‘build/pages/ticketpos/ticketpos.html’,
directives: [SeatingPlan],
})
export class TicketposPage
{
seatingplan: any;

constructor(private nav: NavController)
{
console.log(“Page loaded”);
}

}

But the issue is that the Component is being loaded twice:

Can any one advise why the component is being loaded twice while the page is being loaded only once.

Thanks,

I have been able to fix it. Had been calling twice in the html file… :confounded: . Apologies for same.