i have a button which updates a counter and another button that goes to another page:
<ion-content>
<button [navPush]="aboutPage">test</button>
<p>
{{Counter}}
</p>
<button (click)="clicking()">+</button>
<ion-content>
and the code behind:
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { AboutPage } from '../about/about';
@Component({
templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
public aboutPage = AboutPage;
public Counter: number = 0;
constructor(public navCtrl: NavController) {
}
clicking(){
this.Counter++;
}
}
1.when click the Back button from About Page(this button is there by default) the + button works behind, the Counter is increasing but the display text on the view is not updating. It is a very simple test and i don't find the issue.
- When click test button i have to click it twice for it to work, is this a ionic 2 issue?
Thanks, Gabi S.