Skip to content

Commit e0ebcbe

Browse files
committed
chore(build)
1 parent 47cda69 commit e0ebcbe

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

dist/forms-angular.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! forms-angular 2015-02-23 */
1+
/*! forms-angular 2015-02-24 */
22
'use strict';
33

44
var formsAngular = angular.module('formsAngular', [
@@ -3166,6 +3166,15 @@ formsAngular.factory('recordHandler', function (
31663166
return text;
31673167
};
31683168

3169+
$scope.getVal = function(expression, index) {
3170+
if (expression.indexOf('$index') === -1 || typeof index !== 'undefined') {
3171+
expression = expression.replace(/\$index/g, index);
3172+
return $scope.$eval('record.' + expression);
3173+
} else {
3174+
throw new Error('Invalid expression in getVal(): ', expression);
3175+
}
3176+
};
3177+
31693178

31703179
};
31713180

0 commit comments

Comments
 (0)