blob: 321d493e1609f957162f28269c8e600cbf629969 [file] [log] [blame]
Matteo Scandolo7cd88ba2015-12-16 14:23:08 -08001angular.module('ui.bootstrap.demo').controller('DropdownCtrl', function ($scope, $log) {
2 $scope.items = [
3 'The first choice!',
4 'And another choice for you.',
5 'but wait! A third!'
6 ];
7
8 $scope.status = {
9 isopen: false
10 };
11
12 $scope.toggled = function(open) {
13 $log.log('Dropdown is now: ', open);
14 };
15
16 $scope.toggleDropdown = function($event) {
17 $event.preventDefault();
18 $event.stopPropagation();
19 $scope.status.isopen = !$scope.status.isopen;
20 };
21});