Answer the question
In order to leave comments, you need to log in
How to set unique keys in an object?
Good afternoon. In angularJS, the button collects the entered fields from the inputs and adds them to an array, which in turn is drawn on the page.
I get an error Error: ngRepeat:dupes Duplicate Key in Repeater. As I understand it, by analogy with react, you need a unique key for each added object. How to add it within the object?
$scope.read = {
title:'',
text:'',
important: false
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question