|
@@ -1,12 +1,12 @@
|
1
|
1
|
angular.module('app')
|
2
|
|
- .controller('UploadController', ['$scope', '$state', '$mdDialog', 'EffectsBusiness', 'ImagesBusiness', 'luticateAuthCache',
|
3
|
|
- function($scope, $state, $mdDialog, EffectsBusiness, ImagesBusiness, luticateAuthCache) {
|
|
2
|
+ .controller('UploadController', ['$scope', '$state', '$mdDialog', 'EffectsBusiness', 'ImagesBusiness', 'luticateAuthCache', 'errorDialogMd',
|
|
3
|
+ function($scope, $state, $mdDialog, EffectsBusiness, ImagesBusiness, luticateAuthCache, errorDialogMd) {
|
4
|
4
|
|
5
|
5
|
$scope.image = null;
|
6
|
6
|
|
7
|
7
|
var promiseImage = {
|
8
|
8
|
id: "promiseImage",
|
9
|
|
- groups: ["imageView"]
|
|
9
|
+ loaderGroups: ["imageView"]
|
10
|
10
|
};
|
11
|
11
|
|
12
|
12
|
$scope.input = angular.element(angular.element("#filePicker")[0]);
|
|
@@ -45,10 +45,7 @@ angular.module('app')
|
45
|
45
|
}, promiseImage).then(function(data)
|
46
|
46
|
{
|
47
|
47
|
$scope.image.content = data.image;
|
48
|
|
- }, function (error)
|
49
|
|
- {
|
50
|
|
- console.log(error);
|
51
|
|
- });
|
|
48
|
+ }, errorDialogMd.errorDialog);
|
52
|
49
|
};
|
53
|
50
|
|
54
|
51
|
$scope.isUploadVisible = function () {
|
|
@@ -67,9 +64,7 @@ angular.module('app')
|
67
|
64
|
}, promiseImage).then(function(data)
|
68
|
65
|
{
|
69
|
66
|
console.log(data);
|
70
|
|
- }, function (error) {
|
71
|
|
- console.log(error);
|
72
|
|
- });
|
|
67
|
+ }, errorDialogMd.errorDialog);
|
73
|
68
|
};
|
74
|
69
|
|
75
|
70
|
$scope.test = function()
|