2016-07-12 16 views
0

Angular2が新しく、アプリケーションにページネーションを追加したいのですが、ng2ページネーションを使用するときにこのエラーが発生します。Ng2ページネーゼーションエラー

NG2-Pagination ERROR

私はの基本的な例を使用:私は私のコンポーネントにこれを持って http://michaelbromley.github.io/ng2-pagination/

を:

import {ChangeDetectionStrategy, Component, EventEmitter} from 'angular2/core';  
import {PaginatePipe, PaginationControlsCmp, PaginationService} from 'ng2-pagination'; 


@Component({ 

    selector: 'consultaVehicle', 
    templateUrl: 'app/components/home/vehicles/consultaVehicle.html', 
    providers: [VehicleService, MarcaModelsService], 
    directives: [PaginationControlsCmp], 
    pipes: [PaginatePipe], 
    changeDetection: ChangeDetectionStrategy.OnPush 
}) 

私はすでにのindex.htmlにバンドルをインポート: /dist/ng2-pagination-bundle.js "

バージョン:

"ng2-pagination": "^0.3.4", 
"angular2": "2.0.0-beta.0", 

ありがとう!

答えて

0

プロバイダとして「PaginationService」を追加する必要があります。

providers: [PaginationService , VehicleService, MarcaModelsService],