I use angularjs version for this json-editor .

Page Controller:

var TaskEditCtrl = function($scope, $http, $routeParams, Notification, Task) { // Загружаем сам объект $scope.task = Task.get({id: $routeParams.taskId}); // Загружаем схему $scope.schema = $http.get("/static/schema/schema.json"); }; 

Page Template:

 <json-editor schema="schema" startval="task.data"> 

The data in the Editor not loaded, an empty editor opens.

How can I solve this problem (if it is not an error in the library)?

  • I had to look for a solution on the English-language site. Solution: here . - Wolkodav

1 answer 1

To solve the problem, you need to rewrite the controller code like this:

 var TaskEditCtrl = function($scope, $http, $routeParams, Notification, Task) { // Загружаем сам объект $scope.task = Task.get({id: $routeParams.taskId}); // Загружаем схему $http .get("/static/schema/schema.json") .then(function(res) { $scope.schema = res; }); };