Open lrz-hal opened 9 years ago
I would change the logic. Iterate through your returned list from your http GET first and enrich the list to mark each item if the word was found or not. At the end of your logic call $defer.resolve. Include an angular expression in your ngTable HTML to then highlight records where the term has appeared based on your added boolean marker property.
This will also give you a cleaner SOC (separation of concerns) by leaving markup in your HTML and logic of if something is found or not based on a search in your javascript.
I have this config in my angular app
What i want to achieve is to mark cells that contains a word. If i put it after $defer.resolve(data), $defer.resolve() is calling later and override it with the new data. I have try $defer.resolve(data).then() because i thought $defer is a promise. But that's not working. So my question is, where i have to put code after ngtable is reloaded.
Many thanks,
Martin