@Kimberlygs wrote:
Hi all
I trying to display the languages based on the region you chose. This is the array:
$scope.regionlanguage = [ { text: "America", value: "se", languages: [ { text: "english", value: "en" }, { text: "nederlands", value: "nl" } ] }, { text: "Belgium", value: "be", languages: [ { text: "english", value: "en" }, { text: "nederlands", value: "nl" } ] } ];
I want to make a view that when I click on the region America I het al those languages. The Ionic app i'm making is multi language.
In my controller now i have this But I don't know how to get the languages of the region i clicked on.
$scope.regionlanguage = [ { text: "Sweden", value: "se", languages: [ { text: "english", value: "en" }, { text: "nederlands", value: "nl" } ] }, { text: "Vlaanderen", value: "be", languages: [ { text: "english", value: "en" }, { text: "nederlands", value: "nl" } ] } ]; $scope.data = {selectedRegion: "se"}; $scope.data = {selectedlanguages:"nl"}; $scope.languagename = []; // get languages names by region $scope.getlanguages = function(region, language) { Settings.set("region", $scope.data.selectedRegion); }
Can someone help me with this? I'm trying to display this in ion-radio items
Thanks in advance
Posts: 1
Participants: 1