Skip to content

Commit

Permalink
Fix resize issue
Browse files Browse the repository at this point in the history
  • Loading branch information
atarix83 committed Jul 5, 2017
1 parent afc3902 commit d46b66f
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions src/app/shared/pagination/pagination.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
ChangeDetectionStrategy,
Component,
EventEmitter,
Input,
OnDestroy,
OnInit,
Output,
ViewEncapsulation
ChangeDetectionStrategy,
Component,
EventEmitter,
Input,
OnDestroy,
OnInit,
Output,
ViewEncapsulation, ChangeDetectorRef
} from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router';
import { Subscription } from "rxjs/Subscription";
Expand Down Expand Up @@ -140,13 +140,13 @@ export class PaginationComponent implements OnDestroy, OnInit {
*/
public paginationControls;

/**
* Array to track all subscriptions and unsubscribe them onDestroy
* @type {Array}
*/
private subs: Subscription[] = [];
/**
* Array to track all subscriptions and unsubscribe them onDestroy
* @type {Array}
*/
private subs: Subscription[] = [];

/**
/**
* An object that represents pagination details of the current viewed page
*/
public showingDetail: any = {
Expand All @@ -161,6 +161,7 @@ export class PaginationComponent implements OnDestroy, OnInit {
this.subs.push(this.hostWindowService.isXs()
.subscribe((status: boolean) => {
this.isXs = status;
this.cdRef.markForCheck();
}));
this.checkConfig(this.paginationOptions);
this.id = this.paginationOptions.id || null;
Expand Down Expand Up @@ -201,8 +202,9 @@ export class PaginationComponent implements OnDestroy, OnInit {
* Router is a singleton service provided by Angular.
*/
constructor(private route: ActivatedRoute,
private cdRef: ChangeDetectorRef,
private router: Router,
public hostWindowService: HostWindowService) {
public hostWindowService: HostWindowService) {
}

/**
Expand Down

0 comments on commit d46b66f

Please sign in to comment.