I have a Kendo chart that receives data from the server using Angular. While loading I have an overlay that displays to show that the data is loading. That works fine, but if I receive an error on my promise call I would like to display another message (i.e. "Could not retrieve data"). Below is a sample of what my call looks like.
1.
service.getData(request)
2.
.then(
function
(result) {
3.
options.success(result.data.data);
4.
// at this point either dataBound or Render is called and I can remove the overlay.
5.
}).
catch
(
function
(error) {
6.
options.error(error);
7.
// What can I call here to change the message in my overlay?
8.
});