{"action":"opened","issue":{"url":"https://api.github.com/repos/brunano21/angular-4-data-table/issues/28","repository_url":"https://api.github.com/repos/brunano21/angular-4-data-table","labels_url":"https://api.github.com/repos/brunano21/angular-4-data-table/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/brunano21/angular-4-data-table/issues/28/comments","events_url":"https://api.github.com/repos/brunano21/angular-4-data-table/issues/28/events","html_url":"https://github.com/brunano21/angular-4-data-table/issues/28","id":323795990,"number":28,"title":"Cannot read property 'length' of undefined","user":{"login":"gpthome","id":5378257,"avatar_url":"https://avatars0.githubusercontent.com/u/5378257?v=4","gravatar_id":"","url":"https://api.github.com/users/gpthome","html_url":"https://github.com/gpthome","followers_url":"https://api.github.com/users/gpthome/followers","following_url":"https://api.github.com/users/gpthome/following{/other_user}","gists_url":"https://api.github.com/users/gpthome/gists{/gist_id}","starred_url":"https://api.github.com/users/gpthome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpthome/subscriptions","organizations_url":"https://api.github.com/users/gpthome/orgs","repos_url":"https://api.github.com/users/gpthome/repos","events_url":"https://api.github.com/users/gpthome/events{/privacy}","received_events_url":"https://api.github.com/users/gpthome/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-16T21:34:35Z","updated_at":"2018-05-16T21:34:35Z","closed_at":null,"author_association":"NONE","body":"We are using this module for the first time.  Works great, except for one small problem.  The table is basically rendering, but ends with a JavaScript error which then prevents other scripts from running.\r\n\r\nWe are using \"angular5-data-table\": \"1.0.0\",\r\n\r\nWe just ran `npm install`, then `ng serve`\r\n\r\nAlso noticed the example here https://www.npmjs.com/package/angular5-data-table shows `itemCount` but the documentation refers to `itemsCount`\r\n\r\nAny thoughts?  \r\n\r\n======================\r\nFrom browser Console\r\n======================\r\nIndexComponent.html:2 ERROR TypeError: Cannot read property 'length' of undefined\r\n    at Object.eval [as updateDirectives] (IndexComponent.html:5)\r\n    at Object.debugUpdateDirectives [as updateDirectives] (core.js:14638)\r\n    at checkAndUpdateView (core.js:13785)\r\n    at callViewAction (core.js:14136)\r\n    at execComponentViewsAction (core.js:14068)\r\n    at checkAndUpdateView (core.js:13791)\r\n    at callViewAction (core.js:14136)\r\n    at execEmbeddedViewsAction (core.js:14094)\r\n    at checkAndUpdateView (core.js:13786)\r\n    at callViewAction (core.js:14136)\r\n\r\n======================\r\nindex.component.html\r\n======================\r\n<div>\r\n  <data-table id=\"my-table\"\r\n              [title]=\"'Status'\"\r\n              [items]=\"incidents\"\r\n              [itemCount]=\"incidents.length\"     <=== this is line 5\r\n  >\r\n    <data-table-column sortable=\"true\"\r\n      [property]=\"'created'\"\r\n      [header]=\"'Created'\"\r\n    >\r\n      <ng-template #dataTableCell let-item=\"item\">\r\n        {{ item.created  | date :'short'}}\r\n      </ng-template>\r\n    </data-table-column>\r\n    ...\r\n    \r\n======================\r\nExample \"incidents\" data\r\n======================\r\n[{\"incidentId\":\"f08651f9-c577-46b9-a9db-f89d72492bdf\",\"title\":\"Title 1\",\"resolve\":false,\"created\":1526354027327,\"updates\":[{\"created\":1526354027327,\"status\":\"SCHEDULED\",\"comment\":\"Comment 1.\",\"postedBy\":\"dude@gmail.com\"}],\"postedBy\":\"dude@gmail.com\",\"application\":\"WIDGET\",\"environment\":\"PROD\"},{\"incidentId\":\"060ade77-ad4d-41c6-bf83-8b92f8250b5d\",\"title\":\"Title 2\",\"resolve\":false,\"created\":1526433270053,\"updates\":[{\"created\":1526433270053,\"status\":\"SCHEDULED\",\"comment\":\"Comment 2\",\"postedBy\":\"dude@gmail.com\"}],\"postedBy\":\"dude@gmail.com\",\"application\":\"WIDGET\",\"environment\":\"PROD\"}]\r\n"}}
{"actor":{"display_login":"gpthome"}}