如果增加的分类为空,那么不关闭页面
This commit is contained in:
parent
5bdacf3500
commit
4eda50a881
|
|
@ -216,10 +216,11 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.addTag = function(tag) {
|
$scope.addTag = function(tag) {
|
||||||
ngDialog.close(dialog);
|
|
||||||
console.log(tag);
|
console.log(tag);
|
||||||
tag = tag.replace(/(^\s*)|(\s*$)/g, '').replace(/\s+/g, ' '); // 去除前后空格,多个空格转为一个空格;
|
tag = tag.replace(/(^\s*)|(\s*$)/g, '').replace(/\s+/g, ' '); // 去除前后空格,多个空格转为一个空格;
|
||||||
if (tag) {
|
if (tag) {
|
||||||
|
ngDialog.close(dialog);
|
||||||
|
|
||||||
var tags = [];
|
var tags = [];
|
||||||
tags.push(tag);
|
tags.push(tag);
|
||||||
bookmarkService.addTags(tags)
|
bookmarkService.addTags(tags)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue