I really don't know what it is, and I'm getting desperate why the factory despite is injected and console logged... is undefined after calling a function.
I'm on an Ionic project, so...

Heres my factory:

```
angular.module('starter.services')
.factory( 'EditarBsnsFct', ['$http', function($http){
  var editarBsns = {};

  editarBsns.editarBsns = function(url,datos){
    $http.post(url, datos)
          .success(function(data, status){
            return data;
          });
  }

  return editarBsns;

}]);

```

and my controller:

```
angular.module('starter.controllers')

.controller('BsnsDashboardEditarCtrl', ['$scope', '$http', '$state', 'EditarBsnsFct', function($scope, $http, $state, EditarBsnsFct){
  $scope.bsns = {};
  $scope.bsns.tags = [];
  $scope.placeholder = 'Etiqueta tu negocio (cheve, rock, dj...)';

  var usuario = JSON.parse( localStorage.getItem('user') );

  $scope.loadTags = function($query){

    return $http.get('http://hoppers.dev/getTags', {cache:true})
                .then( function( res ){
                  var tags = res.data.data;
                  return tags.filter(function(tag) {
                    return tag.nombre.toLowerCase().indexOf($query.toLowerCase()) != -1;
                  });
                });
  }

  $scope.actualizar = function(){
    var url = 'http://hoppers.dev/dashBsns/actualizar/' + usuario.id;
    var datos = JSON.stringify($scope.bsns);

    EditarBsnFct.editarBsns(url, datos)
                    .success( function(){
                       $state.go('dashNegocio.perfil');
                    })
                    .error( function( err ){
                      alert('error');
                    });

  }

}])

```

So when I click actualizar function in my view, it gives me the error:

> 
> ReferenceError: EditarBsnFct is not defined
>  at Scope.$scope.actualizar (<http://localhost:8100/js/Controllers/bsnsDashboardEditarCtrl.js:26:5>)
>  at fn (eval at (<http://localhost:8100/lib/ionic/js/ionic.bundle.js:21972:15>),
>  :4:221)
>  at <http://localhost:8100/lib/ionic/js/ionic.bundle.js:57514:9>
>  at Scope.parent.$get.Scope.$eval (<http://localhost:8100/lib/ionic/js/ionic.bundle.js:24673:28>)
>  at Scope.parent.$get.Scope.$apply (<http://localhost:8100/lib/ionic/js/ionic.bundle.js:24772:23>)
>  at HTMLButtonElement. (<http://localhost:8100/lib/ionic/js/ionic.bundle.js:57513:13>)
>  at HTMLButtonElement.eventHandler (<http://localhost:8100/lib/ionic/js/ionic.bundle.js:12098:21>)
>  at triggerMouseEvent (<http://localhost:8100/lib/ionic/js/ionic.bundle.js:2865:7>)
>  at tapClick (<http://localhost:8100/lib/ionic/js/ionic.bundle.js:2854:3>)
>  at HTMLDocument.tapMouseUp (<http://localhost:8100/lib/ionic/js/ionic.bundle.js:2927:5>)
> 
> 
> 

I don't know what it is, so hope somebody can help me.

Thanks a lot...