Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs-下拉多选_Angularjs - Fatal编程技术网

Angularjs-下拉多选

Angularjs-下拉多选,angularjs,Angularjs,我试图通过以下方式添加AngularJS multi-select下拉列表 但是我不能得到它 这是我的密码 HTML:- <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="style.css"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min

我试图通过以下方式添加AngularJS multi-select下拉列表

但是我不能得到它

这是我的密码

HTML:-

<!DOCTYPE html>
<html>

  <head>
    <link rel="stylesheet" href="style.css">
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js"></script>
    <script src="https://github.com/dotansimha/angularjs-dropdown-multiselect/blob/master/src/angularjs-dropdown-multiselect.js"> </script>
    <script src="https://github.com/lodash/lodash/blob/master/dist/lodash.js"></script>
    <script src="script.js"></script>
  </head>

<body ng-app="jayApp" ng-controller='jayController'>

Drop down : 
    <div ng-dropdown-multiselect="" options="example1data" selected-model="example1model">

    </div>

</body>

</html>

将模块包括在angular(即在app.js中)-angularjs下拉列表multiselect中

您引用的GitHub js文件不是实际的js文件,而是显示js文件GitHub视图的网页。您需要包含实际的JS文件

编辑:示例:

vs

var jayApp = angular.module('jayApp',[]);

jayApp.controller('jayController', function($scope) {

    $scope.example1model = []; 
    $scope.example1data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}];
})