Hello,
I have a problem initializing IgGridComponent into my Angular2 Application.
my package.json has following packages,
"ignite-ui": "0.16.2-PreRelease.2", "igniteui-angular2": "1.1.0"
while initializing it, it throws following exception,
zone.js:260 Uncaught EXCEPTION: Error in ./SelectionDialogComponent class SelectionDialogComponent - inline template:29:32ORIGINAL EXCEPTION: TypeError: Cannot read property 'prototype' of undefinedORIGINAL STACKTRACE:TypeError: Cannot read property 'prototype' of undefined at IgGridComponent.IgControlBase (http://localhost:41110/libs/igniteui-angular2/igniteui.angular2.js:218:64) at IgGridComponent.IgGridBase [as constructor] (http://localhost:41110/libs/igniteui-angular2/igniteui.angular2.js:424:28) at new IgGridComponent (http://localhost:41110/libs/igniteui-angular2/igniteui.angular2.js:525:28) at DebugAppView._View_SelectionDialogComponent4.createInternal (SelectionDialogComponent.template.js:707:31) at DebugAppView.AppView.create (http://localhost:41110/libs/@angular/core//bundles/core.umd.js:11996:25) at DebugAppView.create (http://localhost:41110/libs/@angular/core//bundles/core.umd.js:12207:48) at TemplateRef_.createEmbeddedView (http://localhost:41110/libs/@angular/core//bundles/core.umd.js:10274:18) at ViewContainerRef_.createEmbeddedView (http://localhost:41110/libs/@angular/core//bundles/core.umd.js:8344:39) at NgIf.set [as ngIf] (http://localhost:41110/libs/@angular/common//bundles/common.umd.js:1741:41) at DebugAppView._View_SelectionDialogComponent0.detectChangesInternal (SelectionDialogComponent.template.js:288:26)ERROR CONTEXT:[object Object]
Could you please help me with this? Is there a problem inside package?
Awaiting for your help.
Regards,
Jeetendra
Hello Jeetendra,
Please share your sample project, so that I can test it on my side. I am not able to guess what could cause this error without seeing your code. Thanks in advance.
Regards,Tsanna
Hi Tsanna,
I have resolved the issue it was due to some conflicting library usage.
I want to also understadn that what is the difference in pacakge "ignite-ui" and 'igniteui-angular2'?
"ignite-ui" has all the requried .js files while in "igniteui-angular2" we do not get any .js file which we need to use to Get igniteUI angular2 components runnig.
Any thoughts on this question.
Thanks and Warm regards,
ignite-ui package includes the source code of all controls in IgniteUI, while igniteui-angular2 package includes only the angular2 components. Why do you need any .js files in igniteui-angular2 package to get angular2 components to run? These components don't depend on the source files from the ignite-ui package, they're built using Angular2 framework, but when you use them in an application you should reference on top of the page the required js scripts as in regular jQuery sample.
Please let me know if you have any further questions.
Thank you for the detailed reply.
I would like to use only angular2 components but as you have said we need to reference on top of the page all required .js scripts as in regular jQuery sample.
I have downloaded igniteui-angular2 package via npm but it doesn't contains the required .js or .css files in the downloaded package.
How should i suppose to use the components in my angular2 Application without these .js or .css files? Would you please throw some light on this?
You can reference the required .js and .css files either through the CDN or locally, it's up to you. On the following link you can find angular2 samples of IgniteUI controls for your reference: http://igniteui.github.io/igniteui-angular2/ I hope this helps you resolving your issue.
If I can be of further assistance, please let me know.