angularjs - ngOptions use a later initialized value as result -
i have select ng-options:
res.blob res.name group res.title res in exerciseresources.images the array has such style:
{ name: "bee", title: "animals", path: "/images/animals/bee_1.2.png" } the res.blob initialized during page load, undefined in html. on pageload convert image blob stored in .blob (i refer in ng-options).
the init function in controller refers function in service:
$q(function () { constants.initblob(); }); $scope.exerciseresources = constants.exerciseresources; i think loaded afterwards. there way refresh html, value working?
Comments
Post a Comment