2017-10-07 1 views
0

Ich bin ein Angularjs-Neuling, also tut mir diese Frage zuerst leid.Angularjs multi select dropdown im bootstrap modal

Ich verwende Angular Bootstrap modal ab: https://angular-ui.github.io/bootstrap/

und Multi wählen Dropdown-Liste aus: https://codepen.io/long2know/pen/PqLRyZ

Ich weiß nicht, wie sie gemeinsam nutzen.

hatte ich ein Modul und Controller:

var app = angular.module("opsApp", ["$jsOps", "ngAnimate", "ngSanitize", "ui.bootstrap"]); 
app.controller("OpsLayoutController", function ($uibModal, $log, $document, $scope, $http, jsPlumbService) { 
this.renderParams = { 
     view: { 
      processes: { 
       "default": { 
        template: "process", 
        events: { 
         tap: function (params) { 
          var modalInstance = $uibModal.open({ 
           animation: $scope.animationsEnabled, 
           ariaLabelledBy: "modal-title", 
           ariaDescribedBy: "modal-body", 
           templateUrl: "editNodeModal.html", 
           controller: "ProcessModalInstanceCtrl", 
           controllerAs: "$ctrlProcess", 
           size: "lg", 
           appendTo: undefined, 
           resolve: { 
            process: function() { 
             return params.process.data; 
            } 
           } 
          }); 

          modalInstance.result.then(function (process) { 

          }, function() { 
           $log.info("Modal dismissed at: " + new Date()); 
          }); 
         } 
        } 
       } 
      } 
} 
app.controller("ProcessModalInstanceCtrl", function ($uibModalInstance, process) { 

    $ctrlProcess.process= process; 

    $ctrlProcess.ok = function() { 
     $uibModalInstance.close(process); 
    }; 

    $ctrlProcess.cancel = function() { 
     $uibModalInstance.dismiss("cancel"); 
    }; 
}); 

Das heißt, ich klicken (tap) das Element dann die modale öffnen. Das ist nicht alles von meinem Code.

Kann mir jemand vorschlagen, wie man die Dropdown-Liste in Modal verwendet.

Vielen Dank.

Antwort