forked from muicss/mui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathradio.js
More file actions
39 lines (32 loc) · 753 Bytes
/
radio.js
File metadata and controls
39 lines (32 loc) · 753 Bytes
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
/**
* MUI Angular Radio Component
* @module angular/radio
*/
import angular from 'angular';
const moduleName = 'mui.radio';
angular.module(moduleName, [])
.directive('muiRadio', function() {
return {
restrict: 'AE',
replace: true,
require: ['?ngModel'],
scope: {
label: '@',
name: '@',
value: '@',
ngModel: '=',
ngDisabled: '='
},
template: '<div class="mui-radio">' +
'<label>' +
'<input type="radio" ' +
'name={{name}} ' +
'value={{value}} ' +
'ng-model="ngModel" ' +
'ng-disabled="ngDisabled" ' +
'>{{label}}</label> ' +
'</div>'
}
});
/** Define module API */
export default moduleName;