your last code with some rearrangement looks like below
.controller('dashboardCtrl',
['jlgI18nService', '$scope', '$timeout', '$location', 'bionicoService',
'$state', '$locale',
function
($scope, $timeout, $location, bionicoService, bionicoSamples, $state,
$locale, i18nService){
As you could see bionicoService is now pointing to '$location', rearrange
in the same order with same number of parameters it will work.
On Tuesday, 14 July 2015 09:22:16 UTC+5:30, 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.