<commit_before>/**
 * Created by Andres on 27/03/2015.
 */
(function(){
    'use strict';
    angular
        .module('AppMessage')
        .controller('MessageController',MessageController);
    MessageController.$inject = ['$log','messageFactory'];
    function MessageController($log,messageFactory){
        $log.debug('cargo MessageController');
        var vm = this;
        vm.defecto = 10;// Número de mensajes por defecto
        messages();

        function messages(){
            return messageFactory.getMessages()
                .then(function(data){
                    vm.messages = data;
                    return vm.messages;
                })
                .catch(function(error){
                    alert('Algo malo ocurrio! '+error);
                });
        }
    }


})();<commit_msg>Agregado userFactory al controllador e implementado en la funcion users<commit_after>/**
 * Created by Andres on 27/03/2015.
 */
(function(){
    'use strict';
    angular
        .module('AppMessage')
        .controller('MessageController',MessageController);
    MessageController.$inject = [
        '$log',
        'messageFactory',
        'usersFactory'
    ];
    function MessageController($log,messageFactory,usersFactory){
        $log.debug('cargo MessageController');
        var vm = this;
        vm.defecto = 10;// Número de mensajes por defecto

        messages();
        users();

        function messages(){
            return messageFactory.getMessages()
                .then(function(data){
                    vm.messages = data;
                    return vm.messages;
                })
                .catch(function(error){
                    alert('Algo malo ocurrio con los mensajes! '+error);
                });
        }

        function users(){
            return usersFactory.getUsers()
                .then(function (data) {
                    vm.users = data;
                    return vm.users;
                })
                .catch(function(error){
                    alert('Algo malo ocurrio con los usuarios! '+error);
                });
        }
    }


})();
{'fraction_non_alphanumeric': 0.11756440281030445, 'fraction_numerical': 0.00936768149882904, 'mean_word_length': 1.585956416464891, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6586836', 'n_tokens_mistral': 572, 'n_tokens_neox': 525, 'n_words': 119}