Closes #87: Fix delete vocabulary after adding it

This commit is contained in:
jendib 2016-03-22 00:38:56 +01:00
parent 5a41e9555e
commit 5de77e35dc

View File

@ -34,8 +34,8 @@ angular.module('docs').controller('SettingsVocabulary', function($scope, Restang
// Add an entry // Add an entry
$scope.addEntry = function(entry) { $scope.addEntry = function(entry) {
entry.name = $scope.vocabulary; entry.name = $scope.vocabulary;
Restangular.one('vocabulary').put(entry).then(function() { Restangular.one('vocabulary').put(entry).then(function(data) {
$scope.entries.push(entry); $scope.entries.push(data);
$scope.entry = {}; $scope.entry = {};
}); });
}; };