修改备忘录的一些小bug
This commit is contained in:
parent
beb03e04e8
commit
25b182a84e
|
|
@ -13,6 +13,8 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind
|
|||
$scope.totalPages = 0;
|
||||
$scope.currentPage = 1;
|
||||
$scope.inputPage = '';
|
||||
$scope.searchWord = $stateParams.searchWord
|
||||
$scope.totalItems = 0;
|
||||
|
||||
var timeagoInstance = timeago();
|
||||
|
||||
|
|
@ -188,12 +190,13 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind
|
|||
var params = {
|
||||
currentPage: $scope.currentPage,
|
||||
perPageItems: perPageItems,
|
||||
searchWord: $stateParams.searchWord,
|
||||
searchWord: $scope.searchWord,
|
||||
};
|
||||
bookmarkService.getNotes(params)
|
||||
.then((data) => {
|
||||
$scope.notes = data.notes;
|
||||
$scope.totalPages = Math.ceil(data.totalItems / perPageItems);
|
||||
$scope.totalItems = data.totalItems;
|
||||
$timeout(function() {
|
||||
timeagoInstance.cancel();
|
||||
timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN');
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui grid">
|
||||
<div class="eight wide column" style="margin-top:10px;">共找到备忘一共约{{notes.length}}个</div>
|
||||
<div class="eight wide column" style="margin-top:10px;"><span ng-show="searchWord">通过搜索关键字"{{searchWord}}",</span>共找到备忘一共约{{totalItems}}个</div>
|
||||
<div class="eight wide column">
|
||||
<pagination></pagination>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue