Using TranslateService in a provider is not working
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request
Current behavior Does not find the TranslateService…
Reproduction of the problem
Add a provider, import TranslateService and add it to the constructor… says “The name “TranslateService” cannot be found.”
What is the expected behavior?
Please tell us about your environment:
cordova CLI: 6.5.0
Ionic Framework Version: 2.1.0-201703061537
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.3
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.0
Xcode version: Not installed
Issue Analytics
- State:
- Created 7 years ago
- Comments:24
Top Results From Across the Web
Translate service not working on load page - Stack Overflow
I have a very strange behaviour when using translate service. I configure the translator like this : export class AppComponent implements ...
Read more >Angular I18n: How to Internationalize with ngx-translate | Phrase
Fetching a translation key in TypeScript files. The get() function of TranslateService is used to fetch the translated value of a key in...
Read more >ngx-translate Documentation - CodeAndWeb
Covers: TranslateService API, Translate Pipe & Directive. ... This does of course not work with dynamically created IDs like the one above.
Read more >Top 5 @ngx-translate/core Code Examples - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues ... getTranslate = function () {...
Read more >Doc: Guide - Angular Translate
Declarative templates with data-binding, MVC, dependency injection and great testability ... Asynchronous loading of i18n data; Pluralization support using ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Calling
getTranslation
beforeget
resolves the issue.Make sure to use
service.use ('nl');
somewhere at the start of you application. Then you will get the correct values.