Skip to content

Instantly share code, notes, and snippets.

@hunterloftis
Last active December 19, 2015 09:59
Show Gist options
  • Save hunterloftis/5936945 to your computer and use it in GitHub Desktop.
Save hunterloftis/5936945 to your computer and use it in GitHub Desktop.
// being used like: <div ng-repeat="item in rows()" class="s4-gridform-row">
scope.rows = function() {
var rows = [];
// TODO: technically this is bad form, relying on order in properties (since properties have no order according to spec)
// It works for v1 though.
for (var key in scope.validations) {
rows.push({
type: scope.validations[key],
value: scope.model[key]
});
}
return rows;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment