-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathngBootMaterial.js
42 lines (41 loc) · 1.18 KB
/
ngBootMaterial.js
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
'use strict';
angular.module('ngBootMaterial', [])
.directive('materialInputFix', function() {
return {
restrict: 'A',
link: function(elem, attr, tr) {
$.material.input(elem[0]);
}
};
}).directive('materialRippleFix', function() {
return {
restrict: 'A',
link: function(elem, attr, tr) {
$.material.ripples(elem[0]);
}
};
}).directive('materialCheckboxFix', function() {
return {
restrict: 'A',
link: function(elem, attr, tr) {
$.material.checkbox(elem[0]);
}
};
})
.directive('materialCheckboxFixRepeat', function() {
return {
restrict: 'A',
link: function(elem, attr, tr) {
if(elem.$parent.$parent.$last && elem.$last){
$.material.checkbox(elem[0]);
}
}
};
}).directive('materialRadioFix', function() {
return {
restrict: 'A',
link: function(elem, attr, tr) {
$.material.radio(elem[0]);
}
};
});