Last active
August 29, 2015 14:22
-
-
Save brianfeister/f39ed5e8744e5b2f45c3 to your computer and use it in GitHub Desktop.
select.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var app = angular.module('demo', ['ngSanitize', 'ui.select']); | |
app.controller('DemoCtrl', function($scope, $http, $timeout) { | |
$scope.disabled = undefined; | |
$scope.searchEnabled = undefined; | |
$scope.enable = function() { | |
$scope.disabled = false; | |
}; | |
$scope.disable = function() { | |
$scope.disabled = true; | |
}; | |
$scope.enableSearch = function() { | |
$scope.searchEnabled = true; | |
} | |
$scope.disableSearch = function() { | |
$scope.searchEnabled = false; | |
} | |
$scope.clear = function() { | |
$scope.person.selected = undefined; | |
$scope.address.selected = undefined; | |
$scope.country.selected = undefined; | |
}; | |
$scope.someGroupFn = function (item){ | |
if (item.name[0] >= 'A' && item.name[0] <= 'M') | |
return 'From A - M'; | |
if (item.name[0] >= 'N' && item.name[0] <= 'Z') | |
return 'From N - Z'; | |
}; | |
$scope.availableColors = ['Red','Green','Blue','Yellow','Magenta','Maroon','Umbra','Turquoise']; | |
$scope.singleDemo = {}; | |
$scope.singleDemo.color = ''; | |
$scope.multipleDemo = {}; | |
$scope.multipleDemo.colors = []; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment