Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
Using ig datagrid with angular-cli getting error : Cannot read property 'length' of undefined
posted

I am trying to use datagrid in angular2 application. I have taken code from https://github.com/NilsQuirmbach/cli-ignite-ui. Then i have updated same code to use ig-grid.

I get an error as below

TypeError: Cannot read property 'length' of undefined
at IgGridComponent.IgGridBase.ngAfterContentInit (index.js:423)
at _View_AppComponent0.detectChangesInternal (component.ngfactory.js:86)
at _View_AppComponent0.AppView.detectChanges (view.js:219)
at _View_AppComponent0.DebugAppView.detectChanges (view.js:324)
at _View_AppComponent_Host0.AppView.detectViewChildrenChanges (view.js:245)
at _View_AppComponent_Host0.detectChangesInternal (host.ngfactory.js:33)
at _View_AppComponent_Host0.AppView.detectChanges (view.js:219)
at View_AppComponent_Host0.DebugAppView.detectChanges (view.js:324)
at ViewRef
.detectChanges (view_ref.js:130)
at application_ref.js:437

I have updated few files as below.

app.modules.ts

import { IgDatePickerComponent, IgGridComponent } from 'igniteui-angular2'; @NgModule({ declarations: [ AppComponent, IgDatePickerComponent,IgGridComponent ],

app.component.html

Index.html

`

I have also removed below scripts from angular-cli.json

scripts": [ "../node_modules/ignite-ui/js/infragistics.core-lite.js", "../node_modules/ignite-ui/js/infragistics.lob-lite.js" ],

Please let me know where am i doing mistake.

Thanks in advance.