@dhy wrote:
I have a problem where the variable I use doesn’t apply to all functions,
when I put a variable in one function I can’t take the value in the other functionthismy.ts
export class BooktravelPage { public kursi_dipilih:any; public jumlah_kursi_dipilih: any; public kursis_dipilih: any; public list_kursi_dipesan:any; public kursi:any; constructor(public navCtrl: NavController, public navParams: NavParams, private storage: Storage, public authService: AuthServiceProvider) { } ionViewWillEnter(){ this.kursi_dipilih; this.jumlah_kursi_dipilih = 0; this.kursis_dipilih = new Array(); this.list_kursi_dipesan; //$scope.jumlah_kursi_dipilih = 0; this.kursis_dipilih.length = 0; this.kursi = ''; } pilihKursi(){ console.log(this.jumlah_kursi_dipilih); }
Posts: 2
Participants: 2