forked from Archives/Athou_commafeed
fix tag removal
This commit is contained in:
@@ -66,11 +66,14 @@ module.directive('tags', function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.$watch('entry.tags', function(newValue, oldValue) {
|
$scope.$watch('entry.tags', function(newValue, oldValue) {
|
||||||
if (newValue && oldValue && newValue != oldValue) {
|
if (oldValue && newValue != oldValue) {
|
||||||
var data = {
|
var data = {
|
||||||
entryId : $scope.entry.id,
|
entryId : $scope.entry.id,
|
||||||
tags : newValue.split(',')
|
tags : []
|
||||||
};
|
};
|
||||||
|
if (newValue) {
|
||||||
|
data.tags = newValue.split(',');
|
||||||
|
}
|
||||||
EntryService.tag(data);
|
EntryService.tag(data);
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user