Urigo / meteor-angular-socially

angular-meteor example and tutorial app
https://www.angular-meteor.com/tutorials/socially/angular1/bootstrapping
155 stars 144 forks source link

PartiesSort not work (TypeError: this.onChange is not a function) #147

Closed flawlite closed 7 years ago

flawlite commented 7 years ago

It works before, but I don't know why it fails now, even I take the tutorial again from the beginning.

vsuhasm commented 7 years ago

@flawlite how did you fix this?

flawlite commented 7 years ago

Just add $timeout (ref. from latest commit)

`class PartiesSort { constructor($timeout) { 'ngInject';

$timeout(() => this.changed());

}

changed() { this.onChange({ sort: {

  }
});

} }`