Created
October 22, 2013 03:00
-
-
Save infacq/7094560 to your computer and use it in GitHub Desktop.
1) setup pemboleh ubah lokal yang ditugas kepada fungsi _.after
2) panggil pemboleh ubah tadi ke dalam gelung _.each selepas pelaksanaan _.each telah lengkap, maka _.after akan berjalan seperti patutnya
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var renderPoin = _.after(data.models.length, function() { | |
// lakukan sesuatu disini | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.each(data.models, function (poin, i) { | |
renderPoin(); | |
}, self); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment