Hello!
First of all I'm using Kendo UI with AngularJS.
I use schema.parse function to reprocess the results. However, the issue I've is that in parse function I manually overwrite some columns ​with a call from a angular service, which returns promise. The columns which are overwritten via promise are not defined. You can easily imagine that via this example:
- I define two fields: code: {type: 'number'}, name: {type: 'string'}
- Via API call only code is obtained (name is undefined)
- in parse function I call a service which obtains me name (code parameter is passed into it).
Example of parse function:
parse:
function
(data) {
//data.name = 'test'; // THIS WORKS
service.call(data.code).then(
function
(result){
data.name = result;
//DOESN'T WORK
});
return
data;
}
Any possibility to achieve the wanted behaviour? Or some other option to be sure that dependant data can be provided manually (so not via API)?