I'm a bit baffled by Angular. I'm trying to alter a form by giving the fields values from $scope.data but although I know I can "see" the data, I can't get it to display.
When I press on an item on a list I use this to get the data:
ng-click="openModal(data)"
This opens the modal with the form in it and passes the data to the openModal function. I know it's working because there is a pop-up called in the openModal function that says "You are accessing data:" and then the id of the row, or the title or whatever.
Now what I want is to use the data to alter the view, the form. I want this:
<input type="text" placeholder="Namegoeshere" value="{{$scope.data.nameOfRecord}}">
All I get in the input field is the text [object.Object] though.
I know the full record is being passed because
console.log("The data is: ", data);
gives me the full record I can inspect in the console.
Why can I not get access to the data in the form?!