{"size": 883, "ext": "js", "max_stars_repo_path": "public/modules/tipos/controllers/tipos.client.controller.js", "max_stars_repo_name": "mmandril/dicabyte", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/modules/tipos/controllers/tipos.client.controller.js", "max_issues_repo_name": "mmandril/dicabyte", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/modules/tipos/controllers/tipos.client.controller.js", "max_forks_repo_name": "mmandril/dicabyte", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.5277777778, "max_line_length": 105, "alphanum_fraction": 0.6557191393}
(function(){
  'use strict';

  angular.module('tipos').controller('TipoController', TipoController);


  function TipoController ($scope, TipoService, $stateParams, $filter, SubCategoriaService) {

    var tipoService = TipoService;
    var subCategoriaService = SubCategoriaService;
    
    $scope.showProgress = true;

    var idSubcategoria = $stateParams.idSubcategoria;

    subCategoriaService.findOne(idSubcategoria)
    .success(function(data){
      $scope.subCategoria = data;
    })
    .error(function(err){
      console.log(err);
    });
    
    tipoService.find(idSubcategoria)
    .success(function(data){
      $scope.tipos = data;
      $scope.showProgress = false;
    })
    .error(function(err){
      $scope.showProgress = false;
    });
  }   
  TipoController.$inject = ['$scope', 'TipoService', '$stateParams', '$filter', 'SubCategoriaService'];  

})();
