You'd need to have a direct reference. Or a helper function that has closure over the reference. Like:
$scope.myDefs = [
...
createArrayObject({
field: 'supplier',
displayName: $translate('Supplier'),
cellTemplate: "<div class=\"ngCellText\">...</div>"
}),
createArrayObject(.....
]
and elsewhere
function createArrayObject(obj){
obj.displayName.then(function(data){
obj.displayName = data;
});
return obj;
}
Update
as Brian suggested below, Its always a good idea to write generic code you can use all over.
var forEach = angular.forEach,
isFunction = angular.isFunction;
function resolveProperties(obj){
forEach(obj,function(val,key){
if(isFunction(val.then)){
val.then(function(data){
obj[key] = data;
});
}
});
}
So you can use it like...
[
resolveProperties({
myPropertyToResolve: promiseReturningFunction()
}),
....
]