javascript - AngularJS modal popup dropdown not working -
<a href="" ng-click="open_pop()">open popup</a>
controller.js
$scope.open_pop = function() { var modalinstance = $uibmodal.open({ template: '<div id="order-flow-modal" class="inmodal" ng-controller="orderlistingctrl">\n\ <div class="modal-header">\n\ <button aria-hidden="true" data-dismiss="modal" id="reg_close" class="close reg" type="button" ng-click="cancel()"><i class="fa fa-times"></i></button>\n\ <h4 class="modal-title">courier form</h4>\n\ </div>\n\ <form class="form-horizontal" ng-submit="shippedform()">\n\ <div class="modal-body">\n\ <div class="form-group"><label>select courier:</label> <select name="courier_list" class="form-control" id="modal_courier_list" ng-model="shipped.courier_list" ng-init="shipped.courier_list=option.id" ng-options="option.id option.name option in list_of_couriers.availableoptions" required="required">\n\ <option class="" value="" selected="selected">select courier</option>\n\ </select></div>\n\ </div>\n\ <div class="modal-footer">\n\ <button type="submit" class="btn btn-success">submit</button>\n\ </div>\n\ </form>\n\ </div>', windowclass: "animated flipiny", controller: modalinstancectrl, backdrop: true }); modalinstance.opened.then(function() { $timeout(function() { $scope.list_of_couriers = { model: null, availableoptions: [ {id : 1, color : "dhl"}, {model : 2, color : "blued"}, {model : 3, color : "delivery"} ] }; } }, 0); }); }
here code. list_of_couriers.availableoptions
not working in popup open. please me.
Comments
Post a Comment