forked from muicss/mui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoption.js
More file actions
49 lines (40 loc) · 1.01 KB
/
option.js
File metadata and controls
49 lines (40 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* MUI Angular Select Component
* @module angular/select
*/
import angular from 'angular';
import * as formlib from '../js/lib/forms';
import * as util from '../js/lib/util';
import * as jqLite from '../js/lib/jqLite';
const moduleName = 'mui.option';
angular.module(moduleName, [])
.directive('muiOption', function() {
return {
restrict: 'AE',
replace: true,
//require: '^muiSelect',
scope: {
label: '@',
value: '@',
ngDisabled: '='
},
template: '<option>{{label}}</option>',
link: function(scope, element, attrs, controller) {
/*
// register
controller.addMenuItem({
label: attrs.label,
value: attrs.value,
disabled: scope.ngDisabled,
hidden: attrs.hidden
});
// destroy hook
scope.$on('$destroy', function() {
controller.removeMenuItem(attrs.value);
});
*/
}
};
});
/** Define module API */
export default moduleName;