I would like to ask you how I can add a key and a value to an object. I want to get values from textareas, which are generated with the help of ng-repeat, and to push them to an object. courses: {}
With postman it works fine
courses :{
"C#" : "C# 101",
"C++": "C++ Advanced"
}
I have a collection called courses. Then with ng-repeat I create a textarea for each course and from this form I would like to put a key and a value to the object courses. key: course_code, value: course_desc. The problem is that I do not know how to store in the in the DB.
<div class="form-group" ng-repeat="course in courses">
<label for="{{course.name}}">{{course.name}}: </label>
<textarea rows="3" ng-model="course.value" class="form-control"></textarea>
</div>