You may hook the item function result with $q.when() which will handle plain results or promises in same way, e.g.
$q.when(item).then(function(itemResult) {
// use itemResult here
})
To wait for all promises you may use also $q.all()
I need to translate the item text for context menu, and $translate('key') returns a promise by default, but it might be a case for other use cases as well.
You may hook the item function result with
$q.when()
which will handle plain results or promises in same way, e.g.To wait for all promises you may use also
$q.all()
I need to translate the item text for context menu, and $translate('key') returns a promise by default, but it might be a case for other use cases as well.