【发布时间】:2015-11-17 12:59:45
【问题描述】:
我正在尝试通过以下方式添加 AngularJS 多选下拉菜单 http://dotansimha.github.io/angularjs-dropdown-multiselect/#/
但我无法得到它..
这是我的 Plunker 代码
http://plnkr.co/edit/7EV9Fc?p=preview
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>
Javascript
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"}];
})
【问题讨论】:
标签: angularjs