http://localhost:3000/node_modules/ng2-pagination/ 404 (Not Found)
See original GitHub issueI get this error:
I have tried taking help of this link: https://github.com/michaelbromley/ng2-pagination/issues/44 I have included necessary lines of code as suggested by scottmizo in this link i.e in my systemjs.config.js
System.config({
map: {
'ng2-pagination': 'node_modules/ng2-pagination'
},
packages: {
'ng2-pagination ': { main: 'index.js', defaultExtension: 'js'}
}
)
in my app.module.ts import {PaginationControlsCmp, PaginatePipe, PaginationService} from ‘ng2-pagination’;
@NgModule({
imports: [
BrowserModule,
FormsModule,
routing,
HttpModule,
JsonpModule,
ReactiveFormsModule,
DndModule.forRoot()
],
exports: [
BrowserModule,
DndModule
],
declarations: [
AppComponent,
NavBarComponent,
NavDecorateComponent,
ContentComponent,
LoginComponent,
FavouriteComponent,
HomeComponent,
NavBar3Component,
DefaultProjectComponent,
DashboardComponent,
NavBar2Component,
FilterComponent,
IssuestatusComponent,
TrackerComponent,
FooterComponent,
PaginationControlsCmp,
PaginatePipe
],
providers: [
HTTP_PROVIDERS,
TokenService,
ProjectService,
ValueService,
PaginationService
],
bootstrap: [
AppComponent
]
})
export class AppModule { }
then in the component:
import {PaginatePipe, PaginationControlsCmp, PaginationService} from 'ng2-pagination';
@Component({
selector: 'dashboard',
templateUrl: 'app/templates/dashboard.component.html',
providers: [CookieService, ProjectService, TokenService, PaginationService],
directives: [PaginationControlsCmp],
pipes: [PaginatePipe]
})
But error 404 still persists.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
404 Not found · Issue #44 · michaelbromley/ngx-pagination
I followed the installation guide, however I am getting the following error: (index):46 Error: Error: XHR error (404 Not Found) loading ...
Read more >Failed to load resource: the server responded with a status ...
app.min.js:3 GET http://localhost:3000/node_modules/@angular/common/ ... 404 (Not Found) (index):33 Error: Error: XHR error (404 Not Found) ...
Read more >Javascript – Angular2 require is not defined for libraries in ...
I am using angular2-seed as a seed for my project. The require is working perfectly fine in source files. But whenever I include...
Read more >WordPress /page/2 404 pagination problem - what to do?
I will answer this question and provide the link. Simply changing the pagination parameter from "paged" to "page" fixed the issue in my...
Read more >Alfresco/alfresco-ng2-components
ERROR in /home/mikel/workspaces/bee/2017-global-hackaton/test-ng2-component/node_modules/ng2-alfresco-core/src/components/pagination/pagination.module.ts
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

My error
GET http://localhost:3000/node_modules/ng2-pagination/ 404 (Not Found)resolved using…
//systemjs.config.js `System.config({ map: { ‘ng2-pagination’: ‘node_modules/ng2-pagination’ },
packages: { ‘ng2-pagination’: { main: ‘index.js’, defaultExtension: ‘js’} //The was an extra space here } )`
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//app.moduls.ts import {Ng2PaginationModule} from ‘ng2-pagination’; // <-- import the module
imports: [ ...., Ng2PaginationModule, ..... ],///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//template.component.html `
-
content ...
<pagination-controls (pageChange)="p = $event"></pagination-controls> `Use this:
import {Ng2PaginationModule} from 'ng2-pagination'; // <-- import the moduleinstead of the components/services:
import {PaginationControlsCmp, PaginatePipe, PaginationService} from 'ng2-pagination';Within the ngModule of the component where you need the pagination.