These are chat archives for angular/angular-2-ionic-2

10th
Dec 2016
Obeyda Djeffal
@obeyda
Dec 10 2016 15:50

I have a problem, any suggestions?
I have a parent and a child, and i want the child to be notified when a parent's property isIdle is changed.

parent

...
    google.maps.event.addListener(this.map, 'dragstart', () => {
      console.log("drag");
      this.isIdle = false;
    });
    google.maps.event.addListener(this.map, 'idle', () => {
      console.log("idle");
      this.isIdle = true;
    });
...

parent.html

<child [isSet]="isIdle"></child>

child

...
@Input() isSet: boolean;
...
  ngOnChanges(changes) {
    console.log('changes'); // <<<<<<<<<<<<< no output
  }
...
Jspenc72
@jspenc72
Dec 10 2016 21:29
Has anyone had any success with ng2-resource-rest
https://github.com/troyanskiy/ng2-resource-rest
Im able to use these when running ionic serve in safari or chrome without problems but when I run it in the simulator or a the device I get an error that says no provider like I haven't loaded it in ngModule.
Jspenc72
@jspenc72
Dec 10 2016 21:34
It also works just fine in another angular-cli Web app I've got. I'm running ionic 2 rc4.
Sry ionic 2 rc3