From 1e065cfa3827658f598a33db1d6771f10d9c74a4 Mon Sep 17 00:00:00 2001 From: Tanya Date: Tue, 16 Jan 2018 15:29:06 -0500 Subject: [PATCH] change .success to .then Angular 1.6 doesn't support .success https://stackoverflow.com/questions/41169385/http-get-success-is-not-a-function --- dist/angular-localization.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/angular-localization.js b/dist/angular-localization.js index 20578e3..6193345 100644 --- a/dist/angular-localization.js +++ b/dist/angular-localization.js @@ -127,9 +127,10 @@ angular.module('ngLocalize') url += localeConf.fileExtension; $http.get(url) - .success(function (data) { + .then(function (response) { var key, - path = getPath(token); + path = getPath(token), + data= response.data; // Merge the contents of the obtained data into the stored bundle. for (key in data) { if (data.hasOwnProperty(key)) { @@ -153,8 +154,7 @@ angular.module('ngLocalize') if (deferrences[path]) { deferrences[path].resolve(path); } - }) - .error(function (err) { + },function (err) { var path = getPath(token); $log.error('[localizationService] Failed to load: ' + url);