gpt4 book ai didi

Angularjs - 下拉多选

转载 作者:行者123 更新时间:2023-12-02 23:32:24 24 4
gpt4 key购买 nike

我正在尝试通过以下方式添加 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"}];
})

最佳答案

将模块包含在 Angular 中(即在 app.js 中)- angularjs-dropdown-multiselect

关于Angularjs - 下拉多选,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33757602/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com