text: 'use strict'
  
  moduleTiproducto.controller('tipousuarioEditController', ['$scope', '$http', '$location', 'toolService', '$routeParams',
      function ($scope, $http, $location, toolService, $routeParams) {
          $scope.id = $routeParams.id;
          $scope.ruta = $location.path();
          $var1 = "¡Hola a todo el mundo!";
          $var2 = "¡Hola doctor Nick!"
          $scope.mostrar = false;
          $scope.activar = true;
          $scope.ajaxData = "";
          $scope.toggle = function () {
              $scope.mostrar = !$scope.mostrar;
          }
          $scope.enable = function () {
              $scope.activar = !$scope.activar;
          }
          $scope.usuarios = function () {
              $http({
                  method: 'GET',
                  //withCredentials: true,
                  url: 'http://localhost:8081/trolleyes/json?ob=tipoproducto&op=getpage&rpp=10&page=1'
              }).then(function (response) {
                  $scope.status = response.status;
                  $scope.ajaxDataUsuarios = response.data.message;
              }, function (response) {
                  $scope.ajaxDataUsuarios = response.data.message || 'Request failed';
                  $scope.status = response.status;
              });
          }
  
          $http({
              method: 'GET',
              //withCredentials: true,
              url: 'http://localhost:8081/trolleyes/json?ob=tipoproducto=get&id=2'
          }).then(function (response) {
              $scope.status = response.status;
              $scope.ajaxData = response.data.message;
          }, function (response) {
              $scope.ajaxData = response.data.message || 'Request failed';
              $scope.status = response.status;
          });
          $scope.isActive = toolService.isActive;
      }]);