-
Notifications
You must be signed in to change notification settings - Fork 45
Description
scenario 1 :working with static data
xyz.ts
public populateTitleMap() {
var vm = this;
return [
{ value: "value1", name: "text1" },
{ value: "value2", name: "text2" },
{ value: "value3", name: "Select dynamic!" }
];
}
scenario 2 : not working for dynamic data(api call)
xyz.ts file
public populateTitleMap(id:any) {
var vm = this;
var data;
var collection;
vm.taskService.getDictionaryData(id).then(function (response) {
data = response.data;
var x = data.split(',')[0];
var y = data.split(',')[1];
collection= [{ value: x, name: y }, { value: x, name: y }];
return collection;
});
}
the Above code returns data but it is not binding to dropdown whyyyyyyyyyyyyyyy?
it is showing error message as
A callback string must match name of a function in the parent scope undefined
2.Possibly unhandled rejection: A callback string must match name of a function in the parent scope undefined
abcd.cs
callback = "vm.populateTitleMap(" + entityAttribute.enum_type + ")"
please send a quick response to this thread........