mbest / knockout-repeat

REPEAT binding for Knockout
http://mbest.github.io/knockout-repeat/
131 stars 18 forks source link

amd + init and update support #5

Closed mente closed 12 years ago

mente commented 12 years ago

Hello,

Copy-pasted amd support from knockout. Didn't test thorough. Also added init and update callbacks to emulate afterRender and init binding handler.

Looking forward for comments.

Regards, Alex

mente commented 12 years ago

any feedback?

mbest commented 12 years ago

Thanks for submitting this. I did take a look at it right away, but forgot to reply.

It looks to me like the "CommonJS/Node.js" section won't work because "factory" is expecting "ko", but will be getting something called "exports". I don't have CommonJS, Node.js, or RequireJS set up to test this, so I'm hesitant to put it in without testing.

Regarding the init/update callbacks, can you tell me why you want those in?

mente commented 12 years ago

amd support is copy-pasted from knockout. I don't have node.js either, but in requirejs it works ok. init/update callbacks are to emulate custom binding handlers. It can be used like afterRender in template.

mente commented 12 years ago

any chances to get merged? :)

mbest commented 12 years ago

merged.