import { Component, OnInit, AfterViewInit } from '@angular/core';

@Component({
  selector: 'my-app',
  templateUrl: 'app/app.template.html'
})
export class AppComponent implements OnInit, AfterViewInit {
  
   cars: any[];
  paginatorLastSelector:any;

  ngOnInit() {
    this.cars = [
      { "vin": "a1653d4d", "brand": "VW", "year": 1998, "color": "White", "price": 10000 },
      { "vin": "ddeb9b10", "brand": "Mercedes", "year": 1985, "color": "Green", "price": 25000 },
      { "vin": "d8ebe413", "brand": "Jaguar", "year": 1979, "color": "Silver", "price": 30000 },
      { "vin": "aab227b7", "brand": "Audi", "year": 1970, "color": "Black", "price": 12000 },
      { "vin": "631f7412", "brand": "Volvo", "year": 1992, "color": "Red", "price": 15500 },
      { "vin": "7d2d22b0", "brand": "VW", "year": 1993, "color": "Maroon", "price": 40000 },
      { "vin": "50e900ca", "brand": "Fiat", "year": 1964, "color": "Blue", "price": 25000 },
      { "vin": "4bbcd603", "brand": "Renault", "year": 1983, "color": "Maroon", "price": 22000 },
      { "vin": "70214c7e", "brand": "Renault", "year": 1961, "color": "Black", "price": 19000 },
      { "vin": "ec229a92", "brand": "Audi", "year": 1984, "color": "Brown", "price": 36000 },
      { "vin": "1083ee40", "brand": "VW", "year": 1984, "color": "Silver", "price": 215000 },
      { "vin": "6e0da3ab", "brand": "Volvo", "year": 1987, "color": "Silver", "price": 32000 },
      { "vin": "5aee636b", "brand": "Jaguar", "year": 1995, "color": "Maroon", "price": 20000 },
      { "vin": "7cc43997", "brand": "Jaguar", "year": 1984, "color": "Orange", "price": 14000 },
      { "vin": "88ec9f66", "brand": "Honda", "year": 1989, "color": "Maroon", "price": 36000 },
      { "vin": "f5a4a5f5", "brand": "BMW", "year": 1986, "color": "Blue", "price": 28000 },
      { "vin": "15b9a5c9", "brand": "Mercedes", "year": 1986, "color": "Orange", "price": 14000 },
      { "vin": "f7e18d01", "brand": "Mercedes", "year": 1991, "color": "White", "price": 25000 },
      { "vin": "cec593d7", "brand": "VW", "year": 1992, "color": "Blue", "price": 36000 },
      { "vin": "d5bac4f0", "brand": "Renault", "year": 2001, "color": "Blue", "price": 25000 },
      { "vin": "56b527c8", "brand": "Jaguar", "year": 1990, "color": "Yellow", "price": 52000 },
      { "vin": "1ac011ff", "brand": "Audi", "year": 1966, "color": "Maroon", "price": 45000 },
      { "vin": "fc074185", "brand": "BMW", "year": 1962, "color": "Blue", "price": 54000 },
      { "vin": "606ba663", "brand": "Honda", "year": 1982, "color": "Blue", "price": 22000 },
      { "vin": "d05060b8", "brand": "Mercedes", "year": 2003, "color": "Silver", "price": 15000 },
      { "vin": "46e4bbe8", "brand": "Mercedes", "year": 1986, "color": "White", "price": 18000 },
      { "vin": "c29da0d7", "brand": "BMW", "year": 1983, "color": "Brown", "price": 32000 },
      { "vin": "24622f70", "brand": "VW", "year": 1973, "color": "Maroon", "price": 36000 },
      { "vin": "7f573d2c", "brand": "Mercedes", "year": 1991, "color": "Red", "price": 21000 },
      { "vin": "b69e6f5c", "brand": "Jaguar", "year": 1993, "color": "Yellow", "price": 16000 },
      { "vin": "ead9bf1d", "brand": "Fiat", "year": 1968, "color": "Maroon", "price": 43000 },
      { "vin": "bc58113e", "brand": "Renault", "year": 1981, "color": "Silver", "price": 36000 },
      { "vin": "2989d5b1", "brand": "Honda", "year": 2006, "color": "Blue", "price": 240000 },
      { "vin": "c243e3a0", "brand": "Fiat", "year": 1990, "color": "Maroon", "price": 15000 },
      { "vin": "e3d3ebf3", "brand": "Audi", "year": 1996, "color": "White", "price": 28000 },
      { "vin": "45337e7a", "brand": "Mercedes", "year": 1982, "color": "Blue", "price": 14000 },
      { "vin": "36e9cf7e", "brand": "Fiat", "year": 2000, "color": "Orange", "price": 26000 },
      { "vin": "036bf135", "brand": "Mercedes", "year": 1973, "color": "Black", "price": 22000 },
      { "vin": "ad612e9f", "brand": "Mercedes", "year": 1975, "color": "Red", "price": 45000 },
      { "vin": "97c6e1e9", "brand": "Volvo", "year": 1967, "color": "Green", "price": 42000 },
      { "vin": "ae962274", "brand": "Volvo", "year": 1982, "color": "Red", "price": 36000 },
      { "vin": "81f8972a", "brand": "BMW", "year": 2007, "color": "Black", "price": 56000 },
      { "vin": "f8506743", "brand": "Audi", "year": 1975, "color": "Blue", "price": 42000 },
      { "vin": "596859d1", "brand": "Fiat", "year": 2002, "color": "Green", "price": 48000 },
      { "vin": "d83c1d9a", "brand": "Volvo", "year": 1972, "color": "Black", "price": 29000 },
      { "vin": "32f41550", "brand": "Mercedes", "year": 1978, "color": "Brown", "price": 17000 },
      { "vin": "c28cd2e4", "brand": "Volvo", "year": 1982, "color": "Silver", "price": 24000 },
      { "vin": "80890dcc", "brand": "Audi", "year": 1962, "color": "White", "price": 36000 },
      { "vin": "4bf1aeb5", "brand": "VW", "year": 2000, "color": "Silver", "price": 24000 },
      { "vin": "45ca4786", "brand": "BMW", "year": 1995, "color": "Maroon", "price": 50000 }
    ];


  }

  ngAfterViewInit() {
    this.paginatorLastSelector = <HTMLElement>document.querySelector("a.ui-paginator-last");
    this.paginatorLastSelector.title = 'Next';
  }
  
}
import { NgModule }      from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule }    from '@angular/forms';
import { HttpModule }    from '@angular/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { AppComponent }   from './app.component';

// Import PrimeNG modules
import {AccordionModule} from 'primeng/primeng';
import {AutoCompleteModule} from 'primeng/primeng';
import {BreadcrumbModule} from 'primeng/primeng';
import {ButtonModule} from 'primeng/primeng';
import {CalendarModule} from 'primeng/primeng';
import {CarouselModule} from 'primeng/primeng';
import {ChartModule} from 'primeng/primeng';
import {CheckboxModule} from 'primeng/primeng';
import {ChipsModule} from 'primeng/primeng';
import {CodeHighlighterModule} from 'primeng/primeng';
import {ConfirmDialogModule} from 'primeng/primeng';
import {SharedModule} from 'primeng/primeng';
import {ContextMenuModule} from 'primeng/primeng';
import {DataGridModule} from 'primeng/primeng';
import {DataListModule} from 'primeng/primeng';
import {DataScrollerModule} from 'primeng/primeng';
import {DataTableModule} from 'primeng/primeng';
import {DialogModule} from 'primeng/primeng';
import {DragDropModule} from 'primeng/primeng';
import {DropdownModule} from 'primeng/primeng';
import {EditorModule} from 'primeng/primeng';
import {FieldsetModule} from 'primeng/primeng';
import {FileUploadModule} from 'primeng/primeng';
import {GalleriaModule} from 'primeng/primeng';
import {GMapModule} from 'primeng/primeng';
import {GrowlModule} from 'primeng/primeng';
import {InputMaskModule} from 'primeng/primeng';
import {InputSwitchModule} from 'primeng/primeng';
import {InputTextModule} from 'primeng/primeng';
import {InputTextareaModule} from 'primeng/primeng';
import {LightboxModule} from 'primeng/primeng';
import {ListboxModule} from 'primeng/primeng';
import {MegaMenuModule} from 'primeng/primeng';
import {MenuModule} from 'primeng/primeng';
import {MenubarModule} from 'primeng/primeng';
import {MessagesModule} from 'primeng/primeng';
import {MultiSelectModule} from 'primeng/primeng';
import {OrderListModule} from 'primeng/primeng';
import {OverlayPanelModule} from 'primeng/primeng';
import {PaginatorModule} from 'primeng/primeng';
import {PanelModule} from 'primeng/primeng';
import {PanelMenuModule} from 'primeng/primeng';
import {PasswordModule} from 'primeng/primeng';
import {PickListModule} from 'primeng/primeng';
import {ProgressBarModule} from 'primeng/primeng';
import {RadioButtonModule} from 'primeng/primeng';
import {RatingModule} from 'primeng/primeng';
import {ScheduleModule} from 'primeng/primeng';
import {SelectButtonModule} from 'primeng/primeng';
import {SlideMenuModule} from 'primeng/primeng';
import {SliderModule} from 'primeng/primeng';
import {SpinnerModule} from 'primeng/primeng';
import {SplitButtonModule} from 'primeng/primeng';
import {StepsModule} from 'primeng/primeng';
import {TabMenuModule} from 'primeng/primeng';
import {TabViewModule} from 'primeng/primeng';
import {TerminalModule} from 'primeng/primeng';
import {TieredMenuModule} from 'primeng/primeng';
import {ToggleButtonModule} from 'primeng/primeng';
import {ToolbarModule} from 'primeng/primeng';
import {TooltipModule} from 'primeng/primeng';
import {TreeModule} from 'primeng/primeng';
import {TreeTableModule} from 'primeng/primeng';

@NgModule({
  imports: [ 
        BrowserModule, 
        FormsModule,
        ReactiveFormsModule,
        BrowserAnimationsModule,
        AccordionModule,
        AutoCompleteModule,
        BreadcrumbModule,
        ButtonModule,
        CalendarModule,
        CarouselModule,
        ChartModule,
        CheckboxModule,
        ChipsModule,
        CodeHighlighterModule,
        ConfirmDialogModule,
        SharedModule,
        ContextMenuModule,
        DataGridModule,
        DataListModule,
        DataScrollerModule,
        DataTableModule,
        DialogModule,
        DragDropModule,
        DropdownModule,
        EditorModule,
        FieldsetModule,
        FileUploadModule,
        GalleriaModule,
        GMapModule,
        GrowlModule,
        InputMaskModule,
        InputSwitchModule,
        InputTextModule,
        InputTextareaModule,
        LightboxModule,
        ListboxModule,
        MegaMenuModule,
        MenuModule,
        MenubarModule,
        MessagesModule,
        MultiSelectModule,
        OrderListModule,
        OverlayPanelModule,
        PaginatorModule,
        PanelModule,
        PanelMenuModule,
        PasswordModule,
        PickListModule,
        ProgressBarModule,
        RadioButtonModule,
        RatingModule,
        ScheduleModule,
        SelectButtonModule,
        SlideMenuModule,
        SliderModule,
        SpinnerModule,
        SplitButtonModule,
        StepsModule,
        TabMenuModule,
        TabViewModule,
        TerminalModule,
        TieredMenuModule,
        ToggleButtonModule,
        ToolbarModule,
        TooltipModule,
        TreeModule,
        TreeTableModule ],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]
})

export class AppModule { }


/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app.module';

const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);
body {
  padding: 2em;
  font-family: Arial, Helvetica, sans-serif;
}
<!DOCTYPE html>
<html>
  <head>
    <title>Angular QuickStart</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="styles.css">
    
    <!-- PrimeNG style dependencies -->
    <link rel="stylesheet" href="https://unpkg.com/primeng@4.2.0/resources/themes/omega/theme.css" />
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
    <link rel="stylesheet" href="https://unpkg.com/primeng@4.2.0/resources/primeng.min.css" />

    <!-- 1. Load libraries -->
    <!-- Polyfill for older browsers -->
    <script src="https://unpkg.com/core-js/client/shim.min.js"></script>

    <script src="https://unpkg.com/zone.js@0.8.4?main=browser"></script>
    <script src="https://unpkg.com/reflect-metadata@0.1.8"></script>
    <script src="https://unpkg.com/systemjs@0.19.39/dist/system.src.js"></script>

    <!-- 2. Configure SystemJS -->
    <script src="systemjs.config.js"></script>
    
  </head>

  <!-- 3. Display the application -->
  <body>
    <my-app>Loading...</my-app>
  </body>
</html>


<!-- 
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->
/**
 * WEB ANGULAR VERSION
 * (based on systemjs.config.js in angular.io)
 * System configuration for Angular samples
 * Adjust as necessary for your application needs.
 */
(function (global) {
  System.config({
    // DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
    transpiler: 'ts',
    typescriptOptions: {
      // Copy of compiler options in standard tsconfig.json
      "target": "es5",
      "module": "commonjs",
      "moduleResolution": "node",
      "sourceMap": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "noImplicitAny": true,
      "suppressImplicitAnyIndexErrors": true
    },
    meta: {
      'typescript': {
        "exports": "ts"
      }
    },
    paths: {
      // paths serve as alias
      'npm:': 'https://unpkg.com/'
    },
    // map tells the System loader where to look for things
    map: {
      // our app is within the app folder
      app: 'app',

     // angular bundles
      '@angular/animations': 'npm:@angular/animations@4.2.6/bundles/animations.umd.js',
      '@angular/animations/browser': 'npm:@angular/animations@4.2.6/bundles/animations-browser.umd.js',
      '@angular/core': 'npm:@angular/core@4.2.6/bundles/core.umd.js',
      '@angular/common': 'npm:@angular/common@4.2.6/bundles/common.umd.js',
      '@angular/compiler': 'npm:@angular/compiler@4.2.6/bundles/compiler.umd.js',
      '@angular/platform-browser': 'npm:@angular/platform-browser@4.2.6/bundles/platform-browser.umd.js',
      '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic@4.2.6/bundles/platform-browser-dynamic.umd.js',
      '@angular/platform-browser/animations': 'npm:@angular/platform-browser@4.2.6/bundles/platform-browser-animations.umd.js',
      '@angular/http': 'npm:@angular/http@4.2.6/bundles/http.umd.js',
      '@angular/router': 'npm:@angular/router@4.2.6/bundles/router.umd.js',
      '@angular/forms': 'npm:@angular/forms@4.2.6/bundles/forms.umd.js',
      '@angular/upgrade': 'npm:@angular/upgrade@4.2.6/bundles/upgrade.umd.js',
      '@angular/upgrade/static': 'npm:@angular/upgrade@4.2.6/bundles/upgrade-static.umd.js',

      // other libraries
      'rxjs':                      'npm:rxjs',
      'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
      'ts':                        'npm:plugin-typescript@4.0.10/lib/plugin.js',
      'typescript':                'npm:typescript@2.0.3/lib/typescript.js',
      'primeng':                   'npm:primeng@4.2.1'

    },
    // packages tells the System loader how to load when no filename and/or no extension
    packages: {
      app: {
        main: './main.ts',
        defaultExtension: 'ts'
      },
      rxjs: {
        defaultExtension: 'js'
      },
      primeng: {
        defaultExtension: 'js'
      }
    }
  });

  if (!global.noBootstrap) { bootstrap(); }

  // Bootstrap the `AppModule`(skip the `app/main.ts` that normally does this)
  function bootstrap() {
    console.log('Auto-bootstrapping');

    // Stub out `app/main.ts` so System.import('app') doesn't fail if called in the index.html
    System.set(System.normalizeSync('app/main.ts'), System.newModule({ }));

    // bootstrap and launch the app (equivalent to standard main.ts)
    Promise.all([
      System.import('@angular/platform-browser-dynamic'),
      getAppModule()
    ])
    .then(function (imports) {
      var platform = imports[0];
      var app      = imports[1];
      platform.platformBrowserDynamic().bootstrapModule(app.AppModule);
    })
    .catch(function(err){ console.error(err); });
  }

  // Import AppModule or make the default AppModule if there isn't one
  // returns a promise for the AppModule
  function getAppModule() {
    if (global.noAppModule) {
      return makeAppModule();
    }
    return System.import('app/app.module').catch(makeAppModule)
  }

  function makeAppModule() {
    console.log('No AppModule; making a bare-bones, default AppModule');

    return Promise.all([
      System.import('@angular/core'),
      System.import('@angular/platform-browser'),
      System.import('app/app.component')
    ])
    .then(function (imports) {

      var core    = imports[0];
      var browser = imports[1];
      var appComp = imports[2].AppComponent;

      var AppModule = function() {}

      AppModule.annotations = [
        new core.NgModule({
          imports:      [ browser.BrowserModule ],
          declarations: [ appComp ],
          bootstrap:    [ appComp ]
        })
      ]
      return {AppModule: AppModule};
    })
  }
})(this);
<p-dataTable [value]="cars" [rows]="10" [paginator]="true" [pageLinks]="3" [rowsPerPageOptions]="[5,10,20]">
    <p-header>List of Cars</p-header>
    <p-column field="vin" header="Vin"></p-column>
    <p-column field="year" header="Year"></p-column>
    <p-column field="brand" header="Brand"></p-column>
    <p-column field="color" header="Color"></p-column>
</p-dataTable>
# PrimeNG Issue Template
Please create a test case and attach the link of the plunkr to your github issue report.