I created a blank ionic2 project like this:
ionic start ig-angular2-test blank
cd ig-angular2-test
Then I installed igniteui via npm:
npm install @infragistics/ignite-ui-full –save
npm install igniteui-angular2 --save
Now I installed dependencies for igniteui via npm:
npm install jquery-ui-bundle --save
npm install modernizr –save
Now I integrated the sample for IgSplitter - Component ( https://www.igniteui.com/splitter/overview ).
If I try to start the sample with ionic-cli command
ionic serve
I get the error "Cannot find module "jquery".
ionic_igniteui_angular2_project.zip
Hello,
Have you tried including script tags- https://ionicframework.com/docs/developer-resources/app-scripts/#script-tag-include?
Regards,
Deyan Kamburov,
Infragistics
Yes, I tried it with and without script-tag-include. There are different results ...
In my 'home.ts' I have add
import * as $ from "jquery";
because in your sample are references to '$'. Could you please have a look at my sources I attended above?
I also tried to define
declare var $ : any; (instead of import) before declaration of jQuery. But then 'jQuery' will not be found.
If I replace all '$' references in your sample with 'jQuery', another error occures:
core.js:1350 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'prototype' of undefinedTypeError: Cannot read property 'prototype' of undefined at IgSplitterComponent.IgControlBase (igniteui-angular2.umd.js:1387) ...
I investigated the sample you attached and made some modifications on it to make it working.
About the product references I added them as script imports and seems to be referring the Ignite UI product as expected.
Please review the sample I'm sending back and let me know if you need further assistance on it.
5008.ionic-cli-project.zip
Many thanks for your investigation! Yes, your modifications work. But on your online help is documented, that installed npm packages can be used:
https://www.igniteui.com/help/using-ignite-ui-npm-packages
This currently does not work!
And also your online example for nested splitter as angular module is not correct:
https://www.igniteui.com/splitter/nested-splitters
It would be nice, if you can initiate an update. This would save time for other developers and for your support!
Once more - thanks for your help!
Thanks for pointing us the sample, we'll work to improve it.
About the npm packages, you can refer the node_modules the same way the cdn scripts are referred.