From eb5024f86bb91a7f646aa0e0a97e97d3f5bda845 Mon Sep 17 00:00:00 2001 From: "John A. Barbuto" Date: Mon, 27 Feb 2017 17:55:07 -0800 Subject: [PATCH] Switch to http then() method for supporting angular 1.6 `http.success()` was deprecated in 1.5 and removed in 1.6. https://code.angularjs.org/1.6.2/docs/guide/migration#migrate1.5to1.6-ng-services-$http --- .../widget/data_viz/gviz/chart-wrapper-service.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/components/widget/data_viz/gviz/chart-wrapper-service.js b/client/components/widget/data_viz/gviz/chart-wrapper-service.js index 69b5494..a58a961 100644 --- a/client/components/widget/data_viz/gviz/chart-wrapper-service.js +++ b/client/components/widget/data_viz/gviz/chart-wrapper-service.js @@ -145,12 +145,12 @@ const ChartWrapperService = ( */ ChartWrapperService.prototype.loadCharts = function() { this.http_.get('/static/components/widget/data_viz/gviz/gviz-charts.json'). - success(angular.bind(this, function(response) { - goog.array.extend(this.allCharts, response); + then(angular.bind(this, function(response) { + goog.array.extend(this.allCharts, response.data); this.allChartsIndex = /** @type {!Object} */ ( this.arrayUtilSvc_.getDictionary(this.allCharts, 'className')); - })). - error(angular.bind(this, function(response) { + }), + angular.bind(this, function(response) { while (this.allCharts.length > 0) { this.allCharts.pop(); }