I'm currently building a multilingual AngularJS app. All my data is retrieved from api which returns the correct languages. The problem is. Currently I'm using a $scope for every button, every thing in the app. Is this the best way or is there a way to call this directly from a view.
For example:
{{datakey.get.test}}
Some application specific info:
I get the data once (when loading the app) from the api. As a $http I currently retrieve the data and then for each scope I do this:
For example the select button:
$scope.selectButton = resourceKey.filter(function (item) {
return item.name === prefix + "select-button"
})[0].value;
Then in the view I call {{selectButton}}
But the problem is. My controller is currently getting spammed with these kinda $scopes.
Can this be done more efficiently?