I managed to fill list item but can't fill the options of an Ionic select component.
Please, see screenshots. Any advise out there?
Ok, I figured it out partially.
ng-modal = Categories
ng-options = Categories.catname for Categories in Categories
This brings up all the values from my restservice.
But when I select one option the first time the option list goes empty.
Any ideas what am I missing?
Hello Bernie,
Please change the property:
preng-modal = Categories/pre
to:
preng-model = selectedCategory/pre
Please change the property:
preng-options = Categories.catname for Categories in Categories /pre
to:
preng-options = Category.catname for Category in Categories /pre
Set the default value of the select component with JS code in the services success function:
pre$scope.selectedCategory = $scope.Categories[0].catname /pre
Serhii,
Thank you so much. This works like a charm.