Hello,
I'm working with your igniteui-angular project and am having trouble with the angular controller style igGrid. Mainly is that the call to getData() function in my factory is asynchronous and so the grid is trying to initialize before the dataSource exists.
Here's what the getData() function looks like in my factory
schedulingApp.factory('shiftsFactory', function ($http, $q) {
var baseUrl = 'odata/ShopShifts'; var shiftsFactory = {};
shiftsFactory.getShifts = function (fabLocID) { var url = baseUrl + '?$filter=LocID eq \'' + fabLocID + '\''; return $http.get(url); }
...
return shiftsFactory;
});
I've found a crappy solution around this, but it comes back to haunt me when trying to add/update the dataSource. Is there maybe an example that exists of the proper way to do the angular controller style igGrid initialization when using an angular factory to get data?
Thanks,
Julie
Hello Julie,
Thank you for contacting Infragistics Developer Support!
I have contacted our development about this and we are researching it. I will let you know as soon there are any updates on this. Meanwhile could provide your workaround solution, it will be of help.
Thank you in advance!