joni2back / angular-filemanager

JavaScript File Manager Material Design Folder Explorer Navigator Browser Manager in AngularJS with CSS3 Responsive (with FTP in PHP / Java / Node)
https://joni2back.github.io/angular-filemanager/
MIT License
1.76k stars 578 forks source link

$translateProvider overwriting SPA translations #344

Closed arnautg closed 6 years ago

arnautg commented 6 years ago

I started using angular-filemanager module on mine SPA who has it's own $translateProvider configuration using 'useStaticFilesLoader', so I installed the module and when I open the page of the directive on the browser, the pre-configured translations are overwritten and broke the translations of the page excluding the translations of the angular-filemanager module.

I found a fix that is not a fix because I can't never deploy it but just give me notions about the problem. If I remove from angular-filemanager.min.js the function that configures the $translateProvider and I create a language file on my application translations folder the problem is gone.

So i'm asking if there's a way to avoid the configuration of $translateProvider to be loaded.

arnautg commented 6 years ago

After some research I found the best solution by including all '.js' in src folder excluding 'translations.js' that was the one who was giving problems and configuring correctly the parameter 'tplPath' that sets the location of templates otherwise they will not be found.