mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 05:57:57 +01:00
Tag stats reflect changes in the tag list
This commit is contained in:
parent
c37fb1d4ae
commit
305993e0f9
@ -61,6 +61,13 @@ App.controller('Tag', function($scope, $dialog, $state, Tag, Restangular) {
|
||||
* Update a tag.
|
||||
*/
|
||||
$scope.updateTag = function(tag) {
|
||||
Restangular.one('tag', tag.id).post('', tag);
|
||||
// Update the server
|
||||
Restangular.one('tag', tag.id).post('', tag).then(function () {
|
||||
// Update the stat object
|
||||
var stat = _.find($scope.stats, function (t) {
|
||||
return tag.id == t.id;
|
||||
});
|
||||
_.extend(stat, tag);
|
||||
});
|
||||
};
|
||||
});
|
Loading…
Reference in New Issue
Block a user