Typescript get failed to find exported component,May be exported module not appropriatly imported into other component.
It show an error message while call AddToArray method:
Cannot read property 'push' of undefined
PageOne.ts
var const array = new Array(5);
export array;
class PageOne {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
GoToPage(){
this.navCtrl.push('PageTwo');
}
}
PageTwo.ts
import { players } from '../pageone/pageone.ts'
export class PlayersPage {
constructor(public navCtrl: NavController, public navParams: NavParams) { }
AddToArray(){
array.push("TEST")
}
}