codepb/jquery-template

afterInsert is not called if the data is not array

elgs opened this issue · 3 comments

elgs commented

It seems afterInsert is only called when the data is an array. afterInsert is not called if the data is a javascript object.

Seems to work for me, can you provide me with an example that is failing?

The key point is that, use loadTemplate to load some array into the container, then use loadTemplate to append some object into the same container, and afterInsert didn't get called.

I have attached an example.
jqueryTemplateProblem.zip

My testing shows this is fixed in the latest version from the example you have given. Will close unless you can provide an example that still doesn't work.