Data stored on device


#1

Hi!, i have a couple of variables declared in the controller. They are updated through http and show them with ngModel. But every time I update some data in the database, this data is not updated in the device until I delete the cache of the application. Why is this happening? Is there any way to remove the cache from Ionic?

PS: I’m not using Storage or LocalStorage.

export class HomePage {
  public date: string;
  public clientes = [];

  constructor(private storage: Storage, private device: Device, private http: Http, public navCtrl: NavController, private viewCtrl: ViewController, public menu: MenuController) {
    this.menu = menu;
    this.menu.enable(true, 'myMenu');

    this.http.get('http://fixingmexico.com/prapi/fecha').map(res => res.json()).subscribe(data => {
        this.date = data;
    });
    this.http.get('http://fixingmexico.com/prapi/agenda').map(res => res.json()).subscribe(data => {
        this.clientes = data;
    });
  }
}