aboutsummaryrefslogtreecommitdiffstats
path: root/usecaseui-common/src/main/webapp/app/fusion/scripts/services/leftMenuService.js
blob: 12e19df271c2e553a1eb16595124c7c9d6368017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function isRealValue(obj){
	return obj && obj !== "null" && obj!== "undefined";
}
app.factory('LeftMenuService', function ($http,$log, $q) {
	return {
		getLeftMenu: function() {
			return $http.get('get_menu')
			.then(function(response) {
					if (typeof response.data === 'object') {
						return response.data;
					} else {
						return $q.reject(response.data);
					}
			}, function(response) {
				// something went wrong
				return $q.reject(response.data);
			});
		},
		getAppName: function() {
			return $http.get('get_app_name')
			.then(function(response) {
					if (typeof response.data === 'object') {
						return response.data;
					} else {
						return $q.reject(response.data);
					}
			}, function(response) {
				// something went wrong
				return $q.reject(response.data);
			});
		}
		
	};
});