Anton Anton - 2 years ago 112
AngularJS Question

cannot update values comes from dot nation

On my page, I'm rendering form, where data comes from api call
data looks like:

"id": 22,
"eventTypeId": 1,
"occuredDate": "2016-05-25T00:00:00",
"title": "event refresh",
"description": "check refresh table",
"studyId": 4,
"statusId": 5,
"severityId": 2,
"priorityId": 3,
"": 4,
"": "Study Y",
"": 5,
"": "Closed"


<form style="padding: 15px" ng-submit="submitForm()">
<div class="form-group row">
<div ng-repeat="k in rowKeys | filter: '!id'" ng-model="rowValue">
<label for="rowValue" class="col-sm-2">
{{k | hide:'.name'}}:</label>
<div class=" col-sm-2" >
<input class="form-control rowValue" id="rowValue" ng-model="rowData[k]" ng-disabled="isDisabled()"/>
<button type="submit" class="btn btn-default" ng-if="rowData" >Submit</button>

My problem is when I edit fields such as "title" or "description", everything works fine, but when I try to edit fields such as "" or "" it just refresh the page and doesn't put any updates. Angular watch works fine and I see in console that value has been updated, so could anybody help me to find my mistake?

My submit function:

$scope.submitForm = function() {

$scope.$watch('rowData', function(newValue, oldValue) {
console.log('being watched oldValue:', oldValue, 'newValue:', newValue);
}, true);

method : 'PUT',
url : $scope.globalUrl + $,
data : $scope.rowData //form
.then(function (res) {
return res;
.then(function (){
$('#table').bootstrapTable('refreshOptions', {
'url': $scope.globalUrl

My load function

$scope.load = function (){
method: "GET",
url: $scope.globalUrl + $
}).then(function success(response) {
$scope.rowData =;
}, function error(response) {
console.log("It has happend error in response")

Answer Source

When you have a dot in your key you need to use bracket notation:


Here is a quick example:,console

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download