Planifica / meteor-wizard

Fork of https://github.com/forwarder/meteor-wizard
MIT License
5 stars 2 forks source link

Could use "this" references on "onSuccess" wizard? #11

Open thearabbit opened 9 years ago

thearabbit commented 9 years ago

Could use "this" references on "onSuccess" like this:

onSubmit: function(data, mergedData) {

  var self = this; // this references

  Orders.insert(....), function(err, id) {
    if (err) {
      self.done();
    } else {
      Router.go();
    }
  });
}