bindonce that check multiple values before rendering
olivierbossel opened this issue · 2 comments
Hi,
First of all, thanks for your great work on this plugin.
I'm wondering if there's already something in your plugin to tell it to watch multiple values before rendering the child elements ?
Something like : bindonce="item.message, item.image, item.user" ?
This will be usefull cause in the item object, I have only ID's of elements and I run a request to get the actual image, the actual message, etc... I need to display in the list something like "loading... please wait" (on each line, cause the item in an ng-repeat result) and when all the elements are loaded (image, message and user), render the element..
Thanks in advance for your answer.
Cheers man !
Best, Olivier
Hi Olivier,
Thank you for your words.
Inside bindonce
you can put any expression so in theory you could put even something like this bindonce="(a !== undefined && b!==undefined) ? true : undefined"
or something like bindonce="!!a && !!b || undefined"
and it would work, despite the ugliness.
Anyway I agree that this level of verbosity could be annoying so I'll keep an eye on this issue, if there will be other requests I can consider writing a parser that uses commas or semicolons to check the single values.
Hi Pasvaz,
Thanks for your answer. This seems to be enough for what I need. :)
Cheers !