'use strict';

/**
 * @controller DashboardMainController
 * @property scope
 * @property http
 * @property system
 */
var DashboardMainController = angular.module('dashboard.controllers.main', [
    'system'
])
    .controller('DashboardMainController', [
        '$scope',
        '$http',
        'System',
        function ($scope, $http, System,Global) {
   
            /**
            * @method refresh
            * @description Gets articles list
            */
            $scope.refresh = function () {
               
                $http.get("/qusion/api/article/query", {
                                                                                
                }).success(function(response) {

                    $scope.articles = response;
                });
            };
            
          
            /**
            * @method confirm Confirms the selection
            */
            $scope.confirm = function() {
                System.UI.confirm($scope, { }, function() {
                    System.Message.success("You selected YES");

                }, function() {
                    System.Message.error("You selected NO");
                });
            };

            $scope.refresh();
        }
    ]);