This project is maintained in my spare time, so in order to help me address your issue as quickly as
possible, please provide as much of the following information as you can.
-- Michael
[^ delete this message]
=======
Angular version: 5
ngx-pagination version:
Description of issue:
The pipe 'paginate' could not be found ("="text-center"> {{'labels.No Records Found' | translate}}
<tr *ngFor="let [ERROR ->]item of allItems | paginate: {
itemsPerPage: 10,
currentPage: page }">
"): ng:///LayoutModule/PharmaciesGirdComponent.html@16:22
'pagination-controls' is not a known element:
If 'pagination-controls' is an Angular component, then verify that it is part of this module.
If 'pagination-controls' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
// get pager object from service
this.pager = this.pagerService.getPager(this.allItems.length, page);
// get current page of items
this.pagedItems = this.allItems.slice(this.pager.startIndex, this.pager.endIndex + 1);
Hi, thanks for contributing!
This project is maintained in my spare time, so in order to help me address your issue as quickly as possible, please provide as much of the following information as you can.
-- Michael
[^ delete this message]
=======
Angular version: 5
ngx-pagination version:
Description of issue: The pipe 'paginate' could not be found ("="text-center"> {{'labels.No Records Found' | translate}} <tr *ngFor="let [ERROR ->]item of allItems | paginate: { itemsPerPage: 10, currentPage: page }"> "): ng:///LayoutModule/PharmaciesGirdComponent.html@16:22 'pagination-controls' is not a known element:
Steps to reproduce:
Expected result:
Actual result:
Demo: (if possible, edit this StackBlitz demo and paste the link to your fork)
Any relevant code:
TS file
import { Component, ViewEncapsulation, OnInit, ViewChild, HostListener } from '@angular/core'; import { GridOptions } from "ag-grid"; import { IncrementalValCellComponent } from "../incremental-val-cell/incremental-val-cell.component"; import { CommonModel } from '../../shared/commonModel'; import { HeaderService } from '../components/header/header.service'; import * as alaSQLSpace from 'alasql'; import { GskNumberPipe } from '../../gsk-number.pipe'; import { PagerService } from './pgerservice.service'; import {NgxPaginationModule} from 'ngx-pagination';
@Component({ selector: 'app-pharmacies-gird', templateUrl: './pharmacies-gird.component.html', styleUrls: ['./pharmacies-gird.component.css'], encapsulation: ViewEncapsulation.None }) export class PharmaciesGirdComponent implements OnInit { offerStatus: any = []; public currencySymbol; gskNumberPipe: any private allItems: Array;
// pager object
pager: any = {};
// paged items
pagedItems: any[];
totalRec : number;
page: number = 1;
// private wasInside = false; // public text: String;
// @HostListener('click') // clickInside() { // this.text = "clicked inside"; // this.wasInside = true; // }
// @HostListener('document:click') // clickout() { // if (!this.wasInside) { // this.text = "clicked outside"; // document.getElementById("priortextInput").hidden = true; // } // this.wasInside = false; // }
ngOnInit() { this.offerStatus = [{ id: "All", name: "All Offers" }, { id: "Offer accepted", name: "Offer Accepted" }, { id: "Offer rejected", name: "Offer Rejected" }, { id: "Offer extended, response awaited", name: "Offer Extended response awaited" }, { id: "Offer not yet extended", name: "Offer not yet Extended" } ] } constructor(public headerService: HeaderService, public pagerService: PagerService) { this.gskNumberPipe = new GskNumberPipe() var filterData = this.headerService.getFilterData(); this.currencySymbol = localStorage.getItem("currencySymbol"); alert(filterData); }
buildTable(data){ // alert(data); this.allItems=data; this.totalRec = this.allItems.length; alert(this.totalRec); //setTimeout(this.afterBuildTable,8000); } afterBuildTable(data) { this.allItems=data; //this.totalRec = this.allItems.length; alert(this.allItems); //this.allItems.forEach(element1 => { // alert(element1.name);
// } ); }
/* buildTable(data) {
// var mainDiv = document.createElement("div"); // mainDiv.className = "row";
// var progressdiv = document.createElement("div");
// progressdiv.style.width = 100+"px;"; // progressdiv.style.border = '1px solid'; // progressdiv.style.backgroundColor = "rgba(200, 200, 200, 1)"; // progressdiv.style.height = 20+"px;"; // var colordiv = document.createElement("div"); // colordiv.id = "offeraccdiv"; // colordiv.style.backgroundColor = 'rgba(243, 102, 51, 1)'; // colordiv.style.width = el["increment_value"]; // progressdiv.appendChild(colordiv); // mainDiv.appendChild(progressdiv); // console.log(progressdiv);
} */
setPage(page: number) { // alert("SetPage"); if (page < 1 || page > this.pager.totalPages) { return; }
}
filterOfferSatus(event) { let offerstatusfilterDiv = document.getElementById("offerstatusfilterDiv"); offerstatusfilterDiv.hidden = false; // console.log(event.clientX); offerstatusfilterDiv.style.left = event.clientX; offerstatusfilterDiv.style.top = event.clientY -10+"px"; offerstatusfilterDiv.style.position = "absolute";
}
searchData(value) { //console.log(value); var input, filter, table, tr, td, i; //pharmacyGrid table = document.getElementById("pharmacyGrid"); tr = table.getElementsByTagName("tr"); for (i = 0; i < tr.length; i++) { td = tr[i].getElementsByTagName("td")[0]; //console.log(tr[i].getElementsByTagName("td")[0]); if (td) { //console.log(value); //console.log(td.innerHTML.indexOf(value)); if (td.innerHTML.indexOf(value) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } }
}
}