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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -