I found this cool library to do dropdown menus with angularjs + twitter-bootstrap-3, here:
http://dotansimha.github.io/angularjs-dropdown-multiselect/docs.
I am following the examples, I have this in my html:
<div ng-dropdown-multiselect="" options="stringData" selected-model="stringModel" extra-settings="stringSettings">
</div>
And this in my controller:
$scope.stringData = ['a', 'b', 'c'];
$scope.stringModel = [];
$scope.stringSettings = {
template: '{{option}}',
smartButtonTextConverter: function(skip, option) {
return option;
},
};
And yet, absolutely nothing is being rendered to the page. 🙁
Anybody have any idea what might be wrong?
I have twitter-bootstrap-3, angularjs and ng-dropdown-multiselect loaded in this order:
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="lib/angular/angular.js"></script>
<script type="text/javascript" src="lib/angularjs-dropdown-multiselect/dist/src/angularjs-dropdown-multiselect.js"></script>
2
Answers
When I add the dependency here:
I get this error:
So I checked the docs (again), and it says to use this instead
now it “works”
ughh, gotta love front-end development lol