question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update to angular 2 final

See original GitHub issue

Hi, thanks for contributing!

This project is maintained in my spare time, so in order to help me address your issue as quickly as possible, please provide as much of the following information as you can.

– Michael

Angular 2 version: 2.0.0

ng2-pagination version:

Description of issue: Are you planing to update to angular2 final?

Steps to reproduce:

Expected result:

Actual result:

Demo: (if possible, edit this Plunker demo and paste the link to your fork)

Any relevant code:


Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nenginecommented, Sep 27, 2016

I’m using Angular 2.0 but when ng2-pagination module was imported getting an error. app.module.ts and system.config.js are shown below. Any help is greatly appreciated!

Error: CompileMetadataResolver</CompileMetadataResolver.prototype.getNgModuleMetadata/<@http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14131:33
    CompileMetadataResolver</CompileMetadataResolver.prototype.getNgModuleMetadata@http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14111:19
    RuntimeCompiler</RuntimeCompiler.prototype._compileComponents@http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16803:26
    RuntimeCompiler</RuntimeCompiler.prototype._compileModuleAndComponents@http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16741:34
    RuntimeCompiler</RuntimeCompiler.prototype.compileModuleAsync@http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16732:18
    PlatformRef_</PlatformRef_.prototype._bootstrapModuleWithZone@http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:6954:20
    PlatformRef_</PlatformRef_.prototype.bootstrapModule@http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:6936:20
    @http://localhost:3000/app/main.js:5:1
    @http://localhost:3000/app/main.js:1:31
    @http://localhost:3000/app/main.js:1:2
    ZoneDelegate.prototype.invoke@http://localhost:3000/node_modules/zone.js/dist/zone.js:203:19
    Zone.prototype.run@http://localhost:3000/node_modules/zone.js/dist/zone.js:96:24
    scheduleResolveOrReject/<@http://localhost:3000/node_modules/zone.js/dist/zone.js:462:52
    ZoneDelegate.prototype.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:236:23
    Zone.prototype.runTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:136:28
    drainMicroTaskQueue@http://localhost:3000/node_modules/zone.js/dist/zone.js:368:25
    ZoneTask/this.invoke@http://localhost:3000/node_modules/zone.js/dist/zone.js:308:25
app.module.ts

import { NgModule } from '@angular/core';
import { BrowserModule  } from '@angular/platform-browser';
import { FormsModule }   from '@angular/forms';
import { HttpModule }    from '@angular/http';
import { Ng2PaginationModule } from 'ng2-pagination';
import { routing } from './app.routing';

import { NavbarComponent } from '../app/shared/navbar.component';
import { AppComponent } from './app.component';
import { TopicComponent } from '../app/topics/topic.component';


@NgModule({
    imports: [
        BrowserModule,   
        HttpModule,
        FormsModule,
        Ng2PaginationModule,
        routing     
    ],
    declarations: [ 
        AppComponent,
        DashboardComponent, ],    
    providers: [ ],        
    bootstrap: [AppComponent]
})

export class AppModule { }
system.config.js

(function (global) {
  System.config({
    paths: {
      // paths serve as alias
      'npm:': 'node_modules/'
    },
    // map tells the System loader where to look for things
    map: {
      // our app is within the app folder
      app: 'app',
      // angular bundles
      '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
      '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
      '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
      '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
      '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
      '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
      '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
      '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
      // other libraries
      'rxjs':                       'npm:rxjs',
      'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
      'ng2-pagination': 'npm:ng2-pagination'
    },
    // packages tells the System loader how to load when no filename and/or no extension
    packages: {
      app: {
        main: './main.js',
        defaultExtension: 'js'
      },
      rxjs: {
        defaultExtension: 'js'
      },
      'angular2-in-memory-web-api': {
        main: './index.js',
        defaultExtension: 'js'
      },
      'ng2-pagination': {
        main: './dist/ng2-pagination-bundle.js',
        defaultExtension: 'js'
      }

    }
  });
})(this);
0reactions
finalxcodecommented, Nov 29, 2016

thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Update Guide
Select the options that match your update. Angular versions. From v. 16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.2, 10.1, 10.0, 9.1, 9.0, 8.2,...
Read more >
How do I correctly upgrade angular 2 (npm) to the latest ...
The command npm update -D && npm update -S will update all packages inside package.json to their latest version, according to their defined...
Read more >
How to upgrade Angular 2/4/5 application to Angular 6
In first step install angular CLI globally. npm install -g @angular/cli. The above command will upgrade the globally installed angular CLI to the...
Read more >
How To Update Angular CLI To Latest Version
To update Angular CLI to latest version Angular, use ng update @angular/core @angular/cli@latest command.
Read more >
How to Update Angular Projects to the Latest Version - SitePoint
You don't need to have followed part 1, 2, 3, 4 or 5 of this tutorial for 6 to make sense. You can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found