Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : can.Model file upload with XMLHttpRequest2 upload

$
0
0
Found this: https://github.com/bitovi/canjs/issues/147

Justin says "use trigger like $(obs).trigger(...)" however, jQuery's trigger() automatically passes the first argument of the callback function as the event, whereas, when observing observables in a can.Control with something like '{Post} created', the callback functions would be function(Post, ev, post).

Going to try http://canjs.com/docs/can.Observe.triggerBatch.html

Edit: SUCCESS!
  1. can.trigger(Post, "created", [post]);

Found this in can.Model :)


Viewing all articles
Browse latest Browse all 3491

Trending Articles