Answer the question
In order to leave comments, you need to log in
How to display $scope correctly?
There is $scope
$scope.data = {
"name": {
en: "All",
de: "Alles"
}
};
<div ng-repeat="vm in data">
{{vm.<Как сюда правильно подставить CurrentLanguage?>}}
</div>
app.factory('DataJson', ['$resource','$translate', function($resource, $translate) {
var article = $resource('translate.json');
var CurrentLanguage = $translate.use() || $translate.storage().get($translate.storageKey()) || $translate.preferredLanguage();
var data = article;
return data
}
]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question