Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to populate if the data is comming from webapi #56

Closed
RupenAnjaria opened this issue Jun 29, 2016 · 4 comments
Closed

Unable to populate if the data is comming from webapi #56

RupenAnjaria opened this issue Jun 29, 2016 · 4 comments

Comments

@RupenAnjaria
Copy link

RupenAnjaria commented Jun 29, 2016

Hi, I have following code, to get data from api and then set in list.

` $http.get(sharedProperties.getURLOfLanguagesWebAPI()).then(function (data) {

        allData = sharedProperties.convertXml2JSon(data.data);

        for (var i = 0; i < allData.OVRLookupData.Languages.length; i++) {
            $scope.languages.push({ "id": parseInt(allData.OVRLookupData.Languages[i].LanguageCode), "name": allData.OVRLookupData.Languages[i].Language });
        }

        $scope.loadingLangues = false;

    }, function (data) {
        console.log(data);
    });`

HTML is like:
<label name="Language" class="item item-selectbox"> <span class="input-label" style="float:left">Select Language</span> <button class="button button-dark button-outline icon-right ion-arrow-down-b" modal-select ng-model="selectedValue" options="languages" on-select="languageChange(newValue)" modal-title="Select Language"> {{ selectedValue.name || &apos;Select Language&apos;}} <div class="option">{{option.name}}</div> </button> </label>

If I print in html like {{languages}} then I can see the values. However, the select box shows empty list.

Is it possible to populate values via api call?

@bianchimro
Copy link
Member

hi @RupenAnjaria , does this work after #49 ?

@RupenAnjaria
Copy link
Author

Yes, it is working now.

@bianchimro
Copy link
Member

ok, closing this, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants