The order of your parameters is wrong. You wrote: controller('dashboardCtrl', ['jlgI18nService', '$scope', '$timeout', '$location', 'bionicoService', '$state', '$locale', function($scope, $timeout, $location, bionicoService, bionicoSamples, $state, $locale, i18nService)
But each string of the list has to match the variable name in the function passed as a parameter. That way dependency injection can be achieved. here is what your declaration should actually be: controller('dashboardCtrl', ['$scope', '$timeout', '$location', 'bionicoService', '$state', '$locale', 'jlgI18nService', function($scope, $timeout, $location, bionicoService, bionicoSamples, $state, $locale, i18nService) On Monday, July 13, 2015 at 8:52:16 PM UTC-7, michelle colin wrote: > > I had this: > > .controller('dashboardCtrl', function($scope, $timeout, $location, > bionicoService, bionicoSamples, $state, $locale){ > > And everything worked fine, i could call my services for example > bionicoSamples without a problem But i had to add a module for i18n and it > requires this > > .controller('dashboardCtrl', ['jlgI18nService', function( i18nService){ > > So when i added it to my code, my services stoped working, and i have no > idea why, i'm king of new in angular and there is some conceptual stuff i > don't understand well yet, for instance i really don't understand the > difference betweem using "['module', function()" to "function('module')" > > My code after trying to add the module is lilke this: > > .controller('dashboardCtrl', ['jlgI18nService', function($scope, $timeout, > $location, bionicoService, bionicoSamples, $state, $locale, i18nService){ > > I've also tried this, but is not working too > > .controller('dashboardCtrl', ['jlgI18nService', '$scope', '$timeout', > '$location', 'bionicoService', '$state', '$locale', function($scope, > $timeout, $location, bionicoService, bionicoSamples, $state, $locale, > i18nService){ > > The error i'm getting is that my services are undefined, if i try to call > bionicoSamples.function, it says that this ""function"" is not a function. > I know the problem is in the way i'm importing the services and modules now > with this i18n module, because before it was working fine > > Thanks! > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.