I'm currently working on an angularJS app that needs to have a translation functionality, So I've checked the Angular-translate library and did everything that's in the example.
However when I run my code I get the following error:
Error: Unknown provider: translateFilterProvider <- translateFilter
I've included my code in the following jsfiddle: http://jsfiddle.net/qYqw8/1/
I loaded the angular-translate javascript file before calling the code in the fiddle (which is in portal.js)
this is the order in which I load my files:
<script src="js/lib/angular.js"></script>
<script src="js/lib/angular-resource.js"></script>
<script src="js/lib/jquery-1.10.js"></script>
<script src="js/lib/angular-translate.js"></script>
<script src="js/portal.js"></script>
If anyone can help me out it's highly appreciated,
In case you wondered and since my fiddle is a bit messed up, I did bootstrap my app
<html lang="nl" ng-app="portal">
thx,
J.
Your fiddle is a bit messed up (for example you don't bootstrap the app and some other deps are missing). But in order to use angular-translate, you need to declare it a dependency in your controller:
app.controller("MyCtrl", function($scope, $translate) {
// do some stuff
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With