{"action":"created","issue":{"url":"https://api.github.com/repos/michaelbromley/ng2-pagination/issues/29","repository_url":"https://api.github.com/repos/michaelbromley/ng2-pagination","labels_url":"https://api.github.com/repos/michaelbromley/ng2-pagination/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/michaelbromley/ng2-pagination/issues/29/comments","events_url":"https://api.github.com/repos/michaelbromley/ng2-pagination/issues/29/events","html_url":"https://github.com/michaelbromley/ng2-pagination/issues/29","id":152891424,"number":29,"title":"number: number returns NaN","user":{"login":"baneetgrover","id":18493573,"avatar_url":"https://avatars.githubusercontent.com/u/18493573?v=3","gravatar_id":"","url":"https://api.github.com/users/baneetgrover","html_url":"https://github.com/baneetgrover","followers_url":"https://api.github.com/users/baneetgrover/followers","following_url":"https://api.github.com/users/baneetgrover/following{/other_user}","gists_url":"https://api.github.com/users/baneetgrover/gists{/gist_id}","starred_url":"https://api.github.com/users/baneetgrover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baneetgrover/subscriptions","organizations_url":"https://api.github.com/users/baneetgrover/orgs","repos_url":"https://api.github.com/users/baneetgrover/repos","events_url":"https://api.github.com/users/baneetgrover/events{/privacy}","received_events_url":"https://api.github.com/users/baneetgrover/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-03T22:44:27Z","updated_at":"2016-05-04T21:00:54Z","closed_at":null,"body":"Hello,\r\nFor some reason $event returns NaN. Please see my code below.\r\n\r\n**Angular 2 version**: 2.0.0-beta.17\r\n\r\n**ng2-pagination version**: 0.2.0\r\n\r\n**Description of issue**: When triggering function (pageChange)=\"onPageChanged($event)\", $event returns NaN instead of the page number.\r\n\r\n**Steps to reproduce**: Click on Next in the pagination. (no numbers showing, just next)\r\n\r\n**Expected result**: Receive a page number\r\n\r\n**Actual result**: Receiving NaN\r\n\r\n**Demo**: (if possible, edit [this Plunker demo](http://plnkr.co/edit/JVQMPvV8z2brCIzdG3N4?p=preview) and paste the link to your fork)\r\n\r\nAny relevant code:\r\n\r\n```\r\nimport 'reflect-metadata';\r\nimport {Component} from 'angular2/core';\r\nimport {Parties} from '../../../collections/parties';\r\nimport {PartiesForm} from '../parties-form/parties-form';\r\nimport {RouterLink} from 'angular2/router';\r\nimport {MeteorComponent} from 'angular2-meteor';\r\nimport {LoginButtons, InjectUser} from 'angular2-meteor-accounts-ui';\r\nimport {ReactiveVar} from 'meteor/reactive-var';\r\nimport {PaginationService, PaginatePipe, PaginationControlsCmp} from 'ng2-pagination';\r\n//import {Counts} from 'meteor/tmeasday:publish-counts';\r\n\r\n@Component({\r\n    selector: 'parties-list',\r\n    templateUrl: '/client/views/parties-list/parties-list.html',\r\n    directives: [PartiesForm, RouterLink, LoginButtons, PaginationControlsCmp],\r\n    pipes: [PaginatePipe],\r\n    providers: [PaginationService]\r\n})\r\n\r\n@InjectUser()\r\n\r\nexport class PartiesList extends MeteorComponent {\r\n    parties: Mongo.Cursor<Party>;\r\n    pageSize: number = 10;\r\n    curPage: ReactiveVar<number> = new ReactiveVar<number>(1);\r\n    nameOrder: ReactiveVar<number> = new ReactiveVar<number>(1);\r\n    partiesSize: number = 0;\r\n    location: ReactiveVar<string> = new ReactiveVar<string>(null);\r\n    user: Meteor.User;\r\n    \r\n    constructor() {\r\n        super();\r\n        this.autorun(() => {\r\n            let options = {\r\n                limit: this.pageSize,\r\n                skip: (this.curPage.get() - 1) * this.pageSize,\r\n                sort: {name: this.nameOrder.get()}\r\n            };\r\n            this.subscribe('parties', options, this.location.get(), () => {\r\n                this.parties = Parties.find({}, {sort: {name: this.nameOrder.get() }});\r\n            }, true);\r\n        });\r\n//        this.autorun(() => {\r\n//            this.partiesSize = Counts.get('numberOfParties');\r\n//        }, true);\r\n    }\r\n\r\n    removeParty(party) {\r\n        Parties.remove(party._id);\r\n    }\r\n    \r\n    search(value: string) {\r\n        this.curPage.set(1);\r\n        this.location.set(value);\r\n    }\r\n\r\n    onPageChanged(page: number) {\r\n//        console.log(page);\r\n        this.curPage.set(page);\r\n    }\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/michaelbromley/ng2-pagination/issues/comments/217001391","html_url":"https://github.com/michaelbromley/ng2-pagination/issues/29#issuecomment-217001391","issue_url":"https://api.github.com/repos/michaelbromley/ng2-pagination/issues/29","id":217001391,"user":{"login":"michaelbromley","id":6275952,"avatar_url":"https://avatars.githubusercontent.com/u/6275952?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelbromley","html_url":"https://github.com/michaelbromley","followers_url":"https://api.github.com/users/michaelbromley/followers","following_url":"https://api.github.com/users/michaelbromley/following{/other_user}","gists_url":"https://api.github.com/users/michaelbromley/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelbromley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelbromley/subscriptions","organizations_url":"https://api.github.com/users/michaelbromley/orgs","repos_url":"https://api.github.com/users/michaelbromley/repos","events_url":"https://api.github.com/users/michaelbromley/events{/privacy}","received_events_url":"https://api.github.com/users/michaelbromley/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T21:00:54Z","updated_at":"2016-05-04T21:00:54Z","body":"Thanks for the report. I'll look into it as soon as I get some time."}}