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
$scope.addEntry = function(entry) {
entry.name = $scope.vocabulary;
Restangular.one('vocabulary').put(entry).then(function() {
$scope.entries.push(entry);
Restangular.one('vocabulary').put(entry).then(function(data) {
$scope.entries.push(data);
$scope.entry = {};
});
};