text: (function() {
      'use strict';
      angular
          .module('quisListingApp')
          .factory('Language', Language);
  
      Language.$inject = ['$resource'];
  
      function Language ($resource) {
          var resourceUrl =  'api/admin/languages/:id';
  
          return $resource(resourceUrl, {}, {
              'query': { method: 'GET', isArray: true},
              'get': {
                  method: 'GET',
                  transformResponse: function (data) {
                      if (data) {
                          data = angular.fromJson(data);
                      }
                      return data;
                  }
              },
              'update': {
                  method: 'PUT',
                  transformRequest: function (data) {
                      var copy = angular.copy(data);
                      return angular.toJson(copy);
                  }
              },
              'save': {
                  method: 'POST',
                  transformRequest: function (data) {
                      var copy = angular.copy(data);
                      return angular.toJson(copy);
                  }
              }
          });
      }
  })();
  