Skip to content

Commit bceeb4f

Browse files
committed
Assign a class for each row, named after the model.
1 parent 4fc3841 commit bceeb4f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/angulardynamicform.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@
9494
var fieldScope = $scope.$new(true);
9595
fieldScope.config = field;
9696

97+
rowElem.addClass('control-group--' +
98+
field.model.replace(/([a-z])([A-Z])/g,
99+
function (m) {
100+
return m[0] + '-' + m[1];
101+
}
102+
).toLowerCase()
103+
);
104+
97105
var modelGet = $parse(field.model);
98106
var modelSet = modelGet.assign;
99107

0 commit comments

Comments
 (0)