// scope function which adds a new term
$scope.addTerm = function() {
- terms.push({});
+ terms.push({});
};
camForm.on('form-loaded', function() {
type: 'json',
value: terms
});
-
});
+ camForm.on('submit', function() {
+ // remove '$$hashKey' properties
+ angular.forEach($scope.terms, function(term) {
+ delete term.$$hashKey;
+ });
+ });
+
</script>
<h3>Terms</h3>
<input id="term"
class="form-control"
type="text"
- required>
+ required
+ ng-model="term.term">
</div>
</div>
</div>