Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
HI im trying to make a Datatype with a dataview. A Textarea is used to display Json.
i have a temp $scope.model.Json
$scope.model.Json = JSON.stringify($scope.model.value.Json, undefined, 2);
which is parsed to the original value with JSlint
$scope.model.value.Json = jsonlint.parse($scope.model.Json);
Now if the $scope.model.value.Json is undefined i cant get the scope to update... how do i force this value to update??
i tryied to assign it but it does not update
if ($scope.model.value.Json === undefined) { console.log("default value"); $scope.model.value.Json = {}; } else { $scope.model.Json = JSON.stringify($scope.model.value.Json, undefined, 2); }
Found the solution need to initilize the value it it was undefined
if ($scope.model.value === '') { $scope.model.value = {}; }
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Angular set New dataType with view and Undefined value
HI im trying to make a Datatype with a dataview. A Textarea is used to display Json.
i have a temp $scope.model.Json
which is parsed to the original value with JSlint
Now if the $scope.model.value.Json is undefined i cant get the scope to update... how do i force this value to update??
i tryied to assign it but it does not update
Found the solution need to initilize the value it it was undefined
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.