I'm trying to configure PrimeNG in my Angular2 project based on angular2-webpack-starter (https://github.com/AngularClass/angular2-webpack-starter).
I installed PrimeNG and PrimeUI using npm install, then added necessary typings as ambient dependencies:
"jquery": "github:DefinitelyTyped/DefinitelyTyped/jquery/jquery.d.ts#470954c4f427e0805a2d633636a7c6aa7170def8",
"jqueryui": "github:DefinitelyTyped/DefinitelyTyped/jqueryui/jqueryui.d.ts#a3a5cd5554dc2c0ff8955d1db0673879af3095bc",
"primeui": "github:primefaces/primeui/primeui.d.ts#7640bc59a3634e501634655217fdd413bed6d003",
Firstly I had a problem with jquery typing. It was giving me the following error:
Subsequent variable declarations must have the same type. Variable '$' must be of type 'cssSelectorHelper', but here has type 'JQueryStatic'.
I solved it by commenting out the following lines in typings/browser/ambient/jquery/index.d.ts
:
declare module "jquery" {
export = $;
}
declare var $: JQueryStatic;
Now I am trying to import primeui-ng-all.min.js
within vendor.ts
file using import "primeui/primeui-ng-all.min.js";
command. However I am getting the following error:
Module not found: Error: Cannot resolve module 'jquery-ui' in .../angular2-webpack-starter/node_modules/primeui @ ./~/primeui/primeui-ng-all.min.js 8:23135-23167
Is it the correct way of including PrimeNG in angular2-webpack-starter? How should I solve this problem? And maybe how should I import other files required by PrimeNG, as i.e. stylesheets?