Der Versuch, zwei Add ng-pagenation auf eine Komponente in meinem Winkel-cli App werden immer Fehler, die ich bitte jemand helfenNG2-Paginierung Fehler, angular2, eckig-cli
Knoten-Version diagnostizieren kippe 4.4 .5
npm Version 3.8.7
Winkel-cli: 1.0.0-beta.8
**// admin component**
import { Component, OnInit,ChangeDetectionStrategy }
from'@angular/core';
import {AdminService} from '../admin.service';
import {PaginatePipe,PaginationService, PaginationControlsCmp} from
'ng2-Paginierung';
@Component({
moduleId: module.id,
selector: 'app-admin',
templateUrl: 'admin.component.html',
styleUrls: ['admin.component.css'],
providers:[AdminService,PaginationService],
pipes:[PaginatePipe]
})
export class adminComponent implements OnInit {
public approvedPrayers;
public unApprovedPrayers;
public prayer_error:Boolean = false;
constructor(private adminService:AdminService) {}
ngOnInit() {
}}
**// index.html**
<!doctype html>
<html>
<head>
<base href="/">
<meta charset="utf-8">
<title>Prayerbox</title>
<base href="/">
**<script src="https://rawgit.com/michaelbromley/
ng2-pagination/master/dist/ng2-pagination-bundle.js"></script>**
{{#unless environment.production}}
<script src="/ember-cli-live-reload.js" type="text/javascript"></script>
{{/unless}}
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root>Loading...</app-root>
{{#each scripts.polyfills}}
<script src="{{.}}"></script>
{{/each}}
<script>
System.import('system-config.js').then(function() {
System.import('main');
}).catch(console.error.bind(console));
</script>
</body>
</html>
// Fehler
ng2-pagination-bundle.js:10 Uncaught ReferenceError: System is not
defined(anonymous function) @ ng2-pagination-bundle.js:10
zone.js:461 Unhandled Promise rejection: Error: XHR error
(404 Not Found)loading http://localhost:4200/ng2-pagination/index.js
Können Sie versuchen, importieren ng2-Paginierung Skripte nach Polyfills in index.html –
die einzige Sache, die ich in Systemkonfiguration war diese // Thirdparty Barrel. 'rxjs', 'ng2-pagination', – user2674150