Skip to content
This repository was archived by the owner on Jan 29, 2024. It is now read-only.
This repository was archived by the owner on Jan 29, 2024. It is now read-only.

Timing issue when using angular-translate-loader-static-files #79

@rkoch

Description

@rkoch

I've run into something that looks like a timing issue when retrieving the current language during bootstrapping when there aren't any translation tables loaded yet. I am using the local-storage plugin and the static-files loader.

I wanted to validate if the stored language is valid in the .run() function using $translate.uses(). As it needs to load the remote translation file first the language is not applied and the method just returns undefined. If I have the translation tables locally there is no problem at all - but unfortunately thats not an option for me.

I created a plunk to reproduce the issue: http://plnkr.co/edit/EPr9bU?p=preview
I logged the output of $translation(Provider).uses() during .config() and .run() to the console.

Can you look into that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions