1 function NewsCtrl($rootScope, applicationsService , $log,
2 $window, userProfileService, $scope, $cookies, $timeout, $interval,
3 $uibModal, dashboardService, ngDialog) {
9 $scope.getUserAppsIsDone = false;
10 this.userProfileService = userProfileService;
12 $scope.event_content_show = false;
13 $scope.widgetData = [];
15 $scope.editWidgetModalPopup = function(availableData, resourceType) {
17 $scope.editData = JSON.stringify(availableData);
18 $scope.availableDataTemp = $scope.availableData;
24 $scope.updateNews = function() {
25 $scope.newsData.length=0;
26 //dashboardService.getCommonWidgetData('NEWS').then(function(res) {
27 // $log.info(res.message);
28 var newsDataJsonArray = res.response.items;
29 for (var i = 0; i < newsDataJsonArray.length; i++) {
30 $scope.newsData.push(newsDataJsonArray[i]);
32 //})['catch'](function(err) {
33 // $log.error('dashboard controller: failed to get news list', err);
34 // _this.isLoading = false;