I have this controller
.controller('ctrl', function($scope, $rootScope, $timeout, $alert,
$location, $tooltip, $popover, BetSlipFactory,
AccordionsFactory, AuthFactory,
RiskWinCalculations) {...});
and, I am getting this error due to jshint
:
line 10 col 44 This function has too many statements. (41)
so, what should I do to avoid it ?
It doesn't mean poorly managed code as @pankajparkar says before, it could be because you have something like this, lets say this from one of my projects:
you can do this:
that will fix it.
UPDATE
Let me explain:
it is not only related with the dependencies, jslint throws this error when there are too many statements, he says before on line ten which is where the controller begins, so parting from there, he should have too many statements, if you put all those statements in 1 function, those statements will be reduce to 1 :)