Next button and back button from datatable-pager does not working
I'm implementing one ngx-datatable in my project and I'm doing a custom footer for this table, but the next button and back button image to change page from table does not appear in footer.
First of all: follow image below for you see that the next and back button image does not appear
In the footer I'm set the image as example below:
<datatable-pager
[pagerLeftArrowIcon]="'datatable-icon-left'"
[pagerRightArrowIcon]="'datatable-icon-right'"
[pagerPreviousIcon]="'datatable-icon-prev'"
[pagerNextIcon]="'datatable-icon-skip'"
[page]="curPage"
[size]="pageSize"
[count]="rowCount"
[hidden]="!((rowCount / pageSize) > 1)"
(change)="table.onFooterPage($event)">
</datatable-pager>
Look that I'm using the icons
datatable-icon-left, datatable-icon-right, datatable-icon-prev and datatable-icon-skip
This icon is available in my project in the follow path src/scss/partials/ngx-scss/table.scss.
look the code below that represent the datatable-footer style:
.datatable-footer
border-top: 1px solid rgba(0, 0, 0, 0.12);
font-size: 16px;
.page-count
line-height: 50px;
height: 50px;
padding: 0 1.2rem;
.datatable-pager
margin: 0 10px;
li
vertical-align: middle;
&.disabled a
color: rgba(0, 0, 0, 0.26) !important;
background-color: transparent !important;
&.active a
background-color: $color-blue;
color: #fff;
a
padding: 0 6px;
border-radius: 3px;
margin: 6px 3px;
text-align: center;
vertical-align: top;
color: rgba(0, 0, 0, 0.54);
text-decoration: none;
vertical-align: bottom;
&:hover
color: rgba(0, 0, 0, 0.75);
background-color: rgba(158, 158, 158, 0.2);
.datatable-icon-left, .datatable-icon-skip, .datatable-icon-right,
.datatable-icon-prev
font-size: 20px;
line-height: 20px;
padding: 0 3px;
.datatable-icon-right:before
content: "eb27";
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
content: "eb3a";
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
content: "eb26";
font-family: 'icofont';
font-style: normal;
.datatable-icon-down:before
content: "eb28";
font-family: 'icofont';
font-style: normal;
.datatable-icon-prev:before
content: "eb39";
font-family: 'icofont';
font-style: normal;
Follow my code.
I honestly do not know why the buton image not appear. So I would like for your help in this problem.
Follow my all code for better understanding:
html:
<ngx-datatable
class="material"
[rows]="deviceList"
[columnMode]="'force'"
[headerHeight]="50"
[footerHeight]="50"
[rowHeight]="'auto'"
[limit]="rowLimit">
<ngx-datatable-footer>
<ng-template
ngx-datatable-footer-template
let-rowCount="rowCount"
let-pageSize="pageSize"
let-selectedCount="selectedCount"
let-curPage="curPage"
let-offset="offset"
let-isVisible="isVisible">
<div class="footer-page-size-position">
show
</div>
<div class="footer-page-size-position">
<mat-select style="text-align: center" class="mat-select-position" [(value)]="rowLimit" (selectionChange)="changeRowLimits($event.value)">
<mat-option *ngFor="let limit of LIMITS" [value]="limit.value">
limit.value
</mat-option>
</mat-select>
</div>
<div class="footer-page-size-position">
entries
</div>
<datatable-pager
[pagerLeftArrowIcon]="'datatable-icon-left'"
[pagerRightArrowIcon]="'datatable-icon-right'"
[pagerPreviousIcon]="'datatable-icon-prev'"
[pagerNextIcon]="'datatable-icon-skip'"
[page]="curPage"
[size]="pageSize"
[count]="rowCount"
[hidden]="!((rowCount / pageSize) > 1)"
(change)="table.onFooterPage($event)">
</datatable-pager>
</ng-template>
</ngx-datatable-footer>
<ngx-datatable-column name="Photo" [width]="10">
<ng-template let-rowIndex="rowIndex" let-rowsClient="row" ngx-datatable-cell-template>
<img src="assets/images/widget/PHONE1.jpg" alt="" class="img-fluid">
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Product Name">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.model
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Barcode">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.barcode
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="IMEI">
<ng-template let-rowIndex="rowIndex" let-tardisDevices="row" ngx-datatable-cell-template>
deviceList.imei
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="SKU">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.carrier
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="HW Revision">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.hw
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Usage Status">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template> deviceList.deviceStatus</label>
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
file.ts
import Component, OnInit, ViewChild from '@angular/core';
import HttpClient, HttpHeaders from '@angular/common/http';
import DeviceService from
'../../../shared/services/device/device.service.js';
import Device from '../../../shared/models/device.model';
import DatatableComponent from '@swimlane/ngx-datatable';
@Component(
selector: 'app-tardis-home',
templateUrl: './list-devices-.component.html',
providers: [DeviceService],
styleUrls: ['./list-devices.component.scss']
)
export class ListDevicesComponent implements OnInit {
public listDevices: Device;
public temp: Device ;
public rowLimit: number;
@ViewChild(DatatableComponent) table: DatatableComponent;
constructor(private httpClient: HttpClient, private deviceService:
DeviceService)
LIMITS = [
value: 10 ,
value: 25 ,
value: 50 ,
value: 100 ,
value: 500
];
public ngOnInit()
// start table row limit with 10
this.rowLimit = 10;
// load last used devices data
this.deviceService.getAllDevices().subscribe(((listDevices: Device) =>
this.listDevices= listDevices;
this.temp = listDevices;
console.log(this.listDevices);
));
html css angular ngx-datatable
add a comment |
I'm implementing one ngx-datatable in my project and I'm doing a custom footer for this table, but the next button and back button image to change page from table does not appear in footer.
First of all: follow image below for you see that the next and back button image does not appear
In the footer I'm set the image as example below:
<datatable-pager
[pagerLeftArrowIcon]="'datatable-icon-left'"
[pagerRightArrowIcon]="'datatable-icon-right'"
[pagerPreviousIcon]="'datatable-icon-prev'"
[pagerNextIcon]="'datatable-icon-skip'"
[page]="curPage"
[size]="pageSize"
[count]="rowCount"
[hidden]="!((rowCount / pageSize) > 1)"
(change)="table.onFooterPage($event)">
</datatable-pager>
Look that I'm using the icons
datatable-icon-left, datatable-icon-right, datatable-icon-prev and datatable-icon-skip
This icon is available in my project in the follow path src/scss/partials/ngx-scss/table.scss.
look the code below that represent the datatable-footer style:
.datatable-footer
border-top: 1px solid rgba(0, 0, 0, 0.12);
font-size: 16px;
.page-count
line-height: 50px;
height: 50px;
padding: 0 1.2rem;
.datatable-pager
margin: 0 10px;
li
vertical-align: middle;
&.disabled a
color: rgba(0, 0, 0, 0.26) !important;
background-color: transparent !important;
&.active a
background-color: $color-blue;
color: #fff;
a
padding: 0 6px;
border-radius: 3px;
margin: 6px 3px;
text-align: center;
vertical-align: top;
color: rgba(0, 0, 0, 0.54);
text-decoration: none;
vertical-align: bottom;
&:hover
color: rgba(0, 0, 0, 0.75);
background-color: rgba(158, 158, 158, 0.2);
.datatable-icon-left, .datatable-icon-skip, .datatable-icon-right,
.datatable-icon-prev
font-size: 20px;
line-height: 20px;
padding: 0 3px;
.datatable-icon-right:before
content: "eb27";
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
content: "eb3a";
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
content: "eb26";
font-family: 'icofont';
font-style: normal;
.datatable-icon-down:before
content: "eb28";
font-family: 'icofont';
font-style: normal;
.datatable-icon-prev:before
content: "eb39";
font-family: 'icofont';
font-style: normal;
Follow my code.
I honestly do not know why the buton image not appear. So I would like for your help in this problem.
Follow my all code for better understanding:
html:
<ngx-datatable
class="material"
[rows]="deviceList"
[columnMode]="'force'"
[headerHeight]="50"
[footerHeight]="50"
[rowHeight]="'auto'"
[limit]="rowLimit">
<ngx-datatable-footer>
<ng-template
ngx-datatable-footer-template
let-rowCount="rowCount"
let-pageSize="pageSize"
let-selectedCount="selectedCount"
let-curPage="curPage"
let-offset="offset"
let-isVisible="isVisible">
<div class="footer-page-size-position">
show
</div>
<div class="footer-page-size-position">
<mat-select style="text-align: center" class="mat-select-position" [(value)]="rowLimit" (selectionChange)="changeRowLimits($event.value)">
<mat-option *ngFor="let limit of LIMITS" [value]="limit.value">
limit.value
</mat-option>
</mat-select>
</div>
<div class="footer-page-size-position">
entries
</div>
<datatable-pager
[pagerLeftArrowIcon]="'datatable-icon-left'"
[pagerRightArrowIcon]="'datatable-icon-right'"
[pagerPreviousIcon]="'datatable-icon-prev'"
[pagerNextIcon]="'datatable-icon-skip'"
[page]="curPage"
[size]="pageSize"
[count]="rowCount"
[hidden]="!((rowCount / pageSize) > 1)"
(change)="table.onFooterPage($event)">
</datatable-pager>
</ng-template>
</ngx-datatable-footer>
<ngx-datatable-column name="Photo" [width]="10">
<ng-template let-rowIndex="rowIndex" let-rowsClient="row" ngx-datatable-cell-template>
<img src="assets/images/widget/PHONE1.jpg" alt="" class="img-fluid">
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Product Name">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.model
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Barcode">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.barcode
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="IMEI">
<ng-template let-rowIndex="rowIndex" let-tardisDevices="row" ngx-datatable-cell-template>
deviceList.imei
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="SKU">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.carrier
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="HW Revision">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.hw
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Usage Status">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template> deviceList.deviceStatus</label>
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
file.ts
import Component, OnInit, ViewChild from '@angular/core';
import HttpClient, HttpHeaders from '@angular/common/http';
import DeviceService from
'../../../shared/services/device/device.service.js';
import Device from '../../../shared/models/device.model';
import DatatableComponent from '@swimlane/ngx-datatable';
@Component(
selector: 'app-tardis-home',
templateUrl: './list-devices-.component.html',
providers: [DeviceService],
styleUrls: ['./list-devices.component.scss']
)
export class ListDevicesComponent implements OnInit {
public listDevices: Device;
public temp: Device ;
public rowLimit: number;
@ViewChild(DatatableComponent) table: DatatableComponent;
constructor(private httpClient: HttpClient, private deviceService:
DeviceService)
LIMITS = [
value: 10 ,
value: 25 ,
value: 50 ,
value: 100 ,
value: 500
];
public ngOnInit()
// start table row limit with 10
this.rowLimit = 10;
// load last used devices data
this.deviceService.getAllDevices().subscribe(((listDevices: Device) =>
this.listDevices= listDevices;
this.temp = listDevices;
console.log(this.listDevices);
));
html css angular ngx-datatable
First, have you inspected the element to see what is wrong with it?
– wannadream
Nov 14 '18 at 1:00
Yes, I do it, but I cannot identify the problem.
– Joh
Nov 14 '18 at 11:37
Can you add a screenshot of it? Or if you can create a live demo, that will be perfect.
– wannadream
Nov 14 '18 at 16:09
Hello wannadream, I find the solution. I will post the fix code. Thank you.
– Joh
Nov 14 '18 at 16:49
add a comment |
I'm implementing one ngx-datatable in my project and I'm doing a custom footer for this table, but the next button and back button image to change page from table does not appear in footer.
First of all: follow image below for you see that the next and back button image does not appear
In the footer I'm set the image as example below:
<datatable-pager
[pagerLeftArrowIcon]="'datatable-icon-left'"
[pagerRightArrowIcon]="'datatable-icon-right'"
[pagerPreviousIcon]="'datatable-icon-prev'"
[pagerNextIcon]="'datatable-icon-skip'"
[page]="curPage"
[size]="pageSize"
[count]="rowCount"
[hidden]="!((rowCount / pageSize) > 1)"
(change)="table.onFooterPage($event)">
</datatable-pager>
Look that I'm using the icons
datatable-icon-left, datatable-icon-right, datatable-icon-prev and datatable-icon-skip
This icon is available in my project in the follow path src/scss/partials/ngx-scss/table.scss.
look the code below that represent the datatable-footer style:
.datatable-footer
border-top: 1px solid rgba(0, 0, 0, 0.12);
font-size: 16px;
.page-count
line-height: 50px;
height: 50px;
padding: 0 1.2rem;
.datatable-pager
margin: 0 10px;
li
vertical-align: middle;
&.disabled a
color: rgba(0, 0, 0, 0.26) !important;
background-color: transparent !important;
&.active a
background-color: $color-blue;
color: #fff;
a
padding: 0 6px;
border-radius: 3px;
margin: 6px 3px;
text-align: center;
vertical-align: top;
color: rgba(0, 0, 0, 0.54);
text-decoration: none;
vertical-align: bottom;
&:hover
color: rgba(0, 0, 0, 0.75);
background-color: rgba(158, 158, 158, 0.2);
.datatable-icon-left, .datatable-icon-skip, .datatable-icon-right,
.datatable-icon-prev
font-size: 20px;
line-height: 20px;
padding: 0 3px;
.datatable-icon-right:before
content: "eb27";
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
content: "eb3a";
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
content: "eb26";
font-family: 'icofont';
font-style: normal;
.datatable-icon-down:before
content: "eb28";
font-family: 'icofont';
font-style: normal;
.datatable-icon-prev:before
content: "eb39";
font-family: 'icofont';
font-style: normal;
Follow my code.
I honestly do not know why the buton image not appear. So I would like for your help in this problem.
Follow my all code for better understanding:
html:
<ngx-datatable
class="material"
[rows]="deviceList"
[columnMode]="'force'"
[headerHeight]="50"
[footerHeight]="50"
[rowHeight]="'auto'"
[limit]="rowLimit">
<ngx-datatable-footer>
<ng-template
ngx-datatable-footer-template
let-rowCount="rowCount"
let-pageSize="pageSize"
let-selectedCount="selectedCount"
let-curPage="curPage"
let-offset="offset"
let-isVisible="isVisible">
<div class="footer-page-size-position">
show
</div>
<div class="footer-page-size-position">
<mat-select style="text-align: center" class="mat-select-position" [(value)]="rowLimit" (selectionChange)="changeRowLimits($event.value)">
<mat-option *ngFor="let limit of LIMITS" [value]="limit.value">
limit.value
</mat-option>
</mat-select>
</div>
<div class="footer-page-size-position">
entries
</div>
<datatable-pager
[pagerLeftArrowIcon]="'datatable-icon-left'"
[pagerRightArrowIcon]="'datatable-icon-right'"
[pagerPreviousIcon]="'datatable-icon-prev'"
[pagerNextIcon]="'datatable-icon-skip'"
[page]="curPage"
[size]="pageSize"
[count]="rowCount"
[hidden]="!((rowCount / pageSize) > 1)"
(change)="table.onFooterPage($event)">
</datatable-pager>
</ng-template>
</ngx-datatable-footer>
<ngx-datatable-column name="Photo" [width]="10">
<ng-template let-rowIndex="rowIndex" let-rowsClient="row" ngx-datatable-cell-template>
<img src="assets/images/widget/PHONE1.jpg" alt="" class="img-fluid">
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Product Name">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.model
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Barcode">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.barcode
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="IMEI">
<ng-template let-rowIndex="rowIndex" let-tardisDevices="row" ngx-datatable-cell-template>
deviceList.imei
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="SKU">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.carrier
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="HW Revision">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.hw
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Usage Status">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template> deviceList.deviceStatus</label>
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
file.ts
import Component, OnInit, ViewChild from '@angular/core';
import HttpClient, HttpHeaders from '@angular/common/http';
import DeviceService from
'../../../shared/services/device/device.service.js';
import Device from '../../../shared/models/device.model';
import DatatableComponent from '@swimlane/ngx-datatable';
@Component(
selector: 'app-tardis-home',
templateUrl: './list-devices-.component.html',
providers: [DeviceService],
styleUrls: ['./list-devices.component.scss']
)
export class ListDevicesComponent implements OnInit {
public listDevices: Device;
public temp: Device ;
public rowLimit: number;
@ViewChild(DatatableComponent) table: DatatableComponent;
constructor(private httpClient: HttpClient, private deviceService:
DeviceService)
LIMITS = [
value: 10 ,
value: 25 ,
value: 50 ,
value: 100 ,
value: 500
];
public ngOnInit()
// start table row limit with 10
this.rowLimit = 10;
// load last used devices data
this.deviceService.getAllDevices().subscribe(((listDevices: Device) =>
this.listDevices= listDevices;
this.temp = listDevices;
console.log(this.listDevices);
));
html css angular ngx-datatable
I'm implementing one ngx-datatable in my project and I'm doing a custom footer for this table, but the next button and back button image to change page from table does not appear in footer.
First of all: follow image below for you see that the next and back button image does not appear
In the footer I'm set the image as example below:
<datatable-pager
[pagerLeftArrowIcon]="'datatable-icon-left'"
[pagerRightArrowIcon]="'datatable-icon-right'"
[pagerPreviousIcon]="'datatable-icon-prev'"
[pagerNextIcon]="'datatable-icon-skip'"
[page]="curPage"
[size]="pageSize"
[count]="rowCount"
[hidden]="!((rowCount / pageSize) > 1)"
(change)="table.onFooterPage($event)">
</datatable-pager>
Look that I'm using the icons
datatable-icon-left, datatable-icon-right, datatable-icon-prev and datatable-icon-skip
This icon is available in my project in the follow path src/scss/partials/ngx-scss/table.scss.
look the code below that represent the datatable-footer style:
.datatable-footer
border-top: 1px solid rgba(0, 0, 0, 0.12);
font-size: 16px;
.page-count
line-height: 50px;
height: 50px;
padding: 0 1.2rem;
.datatable-pager
margin: 0 10px;
li
vertical-align: middle;
&.disabled a
color: rgba(0, 0, 0, 0.26) !important;
background-color: transparent !important;
&.active a
background-color: $color-blue;
color: #fff;
a
padding: 0 6px;
border-radius: 3px;
margin: 6px 3px;
text-align: center;
vertical-align: top;
color: rgba(0, 0, 0, 0.54);
text-decoration: none;
vertical-align: bottom;
&:hover
color: rgba(0, 0, 0, 0.75);
background-color: rgba(158, 158, 158, 0.2);
.datatable-icon-left, .datatable-icon-skip, .datatable-icon-right,
.datatable-icon-prev
font-size: 20px;
line-height: 20px;
padding: 0 3px;
.datatable-icon-right:before
content: "eb27";
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
content: "eb3a";
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
content: "eb26";
font-family: 'icofont';
font-style: normal;
.datatable-icon-down:before
content: "eb28";
font-family: 'icofont';
font-style: normal;
.datatable-icon-prev:before
content: "eb39";
font-family: 'icofont';
font-style: normal;
Follow my code.
I honestly do not know why the buton image not appear. So I would like for your help in this problem.
Follow my all code for better understanding:
html:
<ngx-datatable
class="material"
[rows]="deviceList"
[columnMode]="'force'"
[headerHeight]="50"
[footerHeight]="50"
[rowHeight]="'auto'"
[limit]="rowLimit">
<ngx-datatable-footer>
<ng-template
ngx-datatable-footer-template
let-rowCount="rowCount"
let-pageSize="pageSize"
let-selectedCount="selectedCount"
let-curPage="curPage"
let-offset="offset"
let-isVisible="isVisible">
<div class="footer-page-size-position">
show
</div>
<div class="footer-page-size-position">
<mat-select style="text-align: center" class="mat-select-position" [(value)]="rowLimit" (selectionChange)="changeRowLimits($event.value)">
<mat-option *ngFor="let limit of LIMITS" [value]="limit.value">
limit.value
</mat-option>
</mat-select>
</div>
<div class="footer-page-size-position">
entries
</div>
<datatable-pager
[pagerLeftArrowIcon]="'datatable-icon-left'"
[pagerRightArrowIcon]="'datatable-icon-right'"
[pagerPreviousIcon]="'datatable-icon-prev'"
[pagerNextIcon]="'datatable-icon-skip'"
[page]="curPage"
[size]="pageSize"
[count]="rowCount"
[hidden]="!((rowCount / pageSize) > 1)"
(change)="table.onFooterPage($event)">
</datatable-pager>
</ng-template>
</ngx-datatable-footer>
<ngx-datatable-column name="Photo" [width]="10">
<ng-template let-rowIndex="rowIndex" let-rowsClient="row" ngx-datatable-cell-template>
<img src="assets/images/widget/PHONE1.jpg" alt="" class="img-fluid">
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Product Name">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.model
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Barcode">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.barcode
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="IMEI">
<ng-template let-rowIndex="rowIndex" let-tardisDevices="row" ngx-datatable-cell-template>
deviceList.imei
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="SKU">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.carrier
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="HW Revision">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template>
deviceList.hw
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Usage Status">
<ng-template let-rowIndex="rowIndex" let-deviceList="row" ngx-datatable-cell-template> deviceList.deviceStatus</label>
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
file.ts
import Component, OnInit, ViewChild from '@angular/core';
import HttpClient, HttpHeaders from '@angular/common/http';
import DeviceService from
'../../../shared/services/device/device.service.js';
import Device from '../../../shared/models/device.model';
import DatatableComponent from '@swimlane/ngx-datatable';
@Component(
selector: 'app-tardis-home',
templateUrl: './list-devices-.component.html',
providers: [DeviceService],
styleUrls: ['./list-devices.component.scss']
)
export class ListDevicesComponent implements OnInit {
public listDevices: Device;
public temp: Device ;
public rowLimit: number;
@ViewChild(DatatableComponent) table: DatatableComponent;
constructor(private httpClient: HttpClient, private deviceService:
DeviceService)
LIMITS = [
value: 10 ,
value: 25 ,
value: 50 ,
value: 100 ,
value: 500
];
public ngOnInit()
// start table row limit with 10
this.rowLimit = 10;
// load last used devices data
this.deviceService.getAllDevices().subscribe(((listDevices: Device) =>
this.listDevices= listDevices;
this.temp = listDevices;
console.log(this.listDevices);
));
html css angular ngx-datatable
html css angular ngx-datatable
edited Nov 13 '18 at 23:00
R. Richards
14.1k93542
14.1k93542
asked Nov 13 '18 at 22:48
JohJoh
567
567
First, have you inspected the element to see what is wrong with it?
– wannadream
Nov 14 '18 at 1:00
Yes, I do it, but I cannot identify the problem.
– Joh
Nov 14 '18 at 11:37
Can you add a screenshot of it? Or if you can create a live demo, that will be perfect.
– wannadream
Nov 14 '18 at 16:09
Hello wannadream, I find the solution. I will post the fix code. Thank you.
– Joh
Nov 14 '18 at 16:49
add a comment |
First, have you inspected the element to see what is wrong with it?
– wannadream
Nov 14 '18 at 1:00
Yes, I do it, but I cannot identify the problem.
– Joh
Nov 14 '18 at 11:37
Can you add a screenshot of it? Or if you can create a live demo, that will be perfect.
– wannadream
Nov 14 '18 at 16:09
Hello wannadream, I find the solution. I will post the fix code. Thank you.
– Joh
Nov 14 '18 at 16:49
First, have you inspected the element to see what is wrong with it?
– wannadream
Nov 14 '18 at 1:00
First, have you inspected the element to see what is wrong with it?
– wannadream
Nov 14 '18 at 1:00
Yes, I do it, but I cannot identify the problem.
– Joh
Nov 14 '18 at 11:37
Yes, I do it, but I cannot identify the problem.
– Joh
Nov 14 '18 at 11:37
Can you add a screenshot of it? Or if you can create a live demo, that will be perfect.
– wannadream
Nov 14 '18 at 16:09
Can you add a screenshot of it? Or if you can create a live demo, that will be perfect.
– wannadream
Nov 14 '18 at 16:09
Hello wannadream, I find the solution. I will post the fix code. Thank you.
– Joh
Nov 14 '18 at 16:49
Hello wannadream, I find the solution. I will post the fix code. Thank you.
– Joh
Nov 14 '18 at 16:49
add a comment |
1 Answer
1
active
oldest
votes
I find the solution for my problem.
for some reason the table.css used by ngx-datatable component has wrong icon hash.
So I removed all content icon in code below.
.datatable-icon-right:before
content: "eb27"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
content: "eb3a"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
content: "eb26"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-down:before
content: "eb28"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-prev:before
content: "eb39"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
So the code make it like this:
.datatable-icon-right:before
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
font-family: 'icofont';
font-style: normal;
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53290676%2fnext-button-and-back-button-from-datatable-pager-does-not-working%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I find the solution for my problem.
for some reason the table.css used by ngx-datatable component has wrong icon hash.
So I removed all content icon in code below.
.datatable-icon-right:before
content: "eb27"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
content: "eb3a"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
content: "eb26"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-down:before
content: "eb28"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-prev:before
content: "eb39"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
So the code make it like this:
.datatable-icon-right:before
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
font-family: 'icofont';
font-style: normal;
add a comment |
I find the solution for my problem.
for some reason the table.css used by ngx-datatable component has wrong icon hash.
So I removed all content icon in code below.
.datatable-icon-right:before
content: "eb27"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
content: "eb3a"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
content: "eb26"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-down:before
content: "eb28"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-prev:before
content: "eb39"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
So the code make it like this:
.datatable-icon-right:before
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
font-family: 'icofont';
font-style: normal;
add a comment |
I find the solution for my problem.
for some reason the table.css used by ngx-datatable component has wrong icon hash.
So I removed all content icon in code below.
.datatable-icon-right:before
content: "eb27"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
content: "eb3a"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
content: "eb26"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-down:before
content: "eb28"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-prev:before
content: "eb39"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
So the code make it like this:
.datatable-icon-right:before
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
font-family: 'icofont';
font-style: normal;
I find the solution for my problem.
for some reason the table.css used by ngx-datatable component has wrong icon hash.
So I removed all content icon in code below.
.datatable-icon-right:before
content: "eb27"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
content: "eb3a"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
content: "eb26"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-down:before
content: "eb28"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
.datatable-icon-prev:before
content: "eb39"; <!-- REMOVE THIS -->
font-family: 'icofont';
font-style: normal;
So the code make it like this:
.datatable-icon-right:before
font-family: 'icofont';
font-style: normal;
.datatable-icon-skip:before
font-family: 'icofont';
font-style: normal;
.datatable-icon-left:before
font-family: 'icofont';
font-style: normal;
answered Nov 14 '18 at 16:55
JohJoh
567
567
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53290676%2fnext-button-and-back-button-from-datatable-pager-does-not-working%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
First, have you inspected the element to see what is wrong with it?
– wannadream
Nov 14 '18 at 1:00
Yes, I do it, but I cannot identify the problem.
– Joh
Nov 14 '18 at 11:37
Can you add a screenshot of it? Or if you can create a live demo, that will be perfect.
– wannadream
Nov 14 '18 at 16:09
Hello wannadream, I find the solution. I will post the fix code. Thank you.
– Joh
Nov 14 '18 at 16:49