|
@@ -146,6 +146,14 @@ app.controller('main', function($scope,$http,$sce) {
|
|
|
$scope.curPage=newPage; //clamp
|
|
$scope.curPage=newPage; //clamp
|
|
|
$scope.filter(newPage);
|
|
$scope.filter(newPage);
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ $scope.pages = function() {
|
|
|
|
|
+ var arr = [];
|
|
|
|
|
+ for(var i=$scope.curPage -2; i<=$scope.curPage+2;i++)
|
|
|
|
|
+ if (i>=1 && i<=$scope.totPages)
|
|
|
|
|
+ arr.push(i);
|
|
|
|
|
+ return arr;
|
|
|
|
|
+ };
|
|
|
$scope.delete_article = function(id) {
|
|
$scope.delete_article = function(id) {
|
|
|
$http.get("/pymnts/article/delete/"+id).then(
|
|
$http.get("/pymnts/article/delete/"+id).then(
|
|
|
function(data) {
|
|
function(data) {
|