Here’s the steps to reproduce the error:
1 -
npm install -g angular-cli@webpack
2 -
ng new demo
3 -
cd demo
4 - Create a
wijmo
folder inside
node_modules
5 - Copy the type definitions (all *.d.ts files) from
Dist/interop/angular2
to
node_modules/wijmo
6 - Copy the actual modules in AMD format from
Dist/interop/angular2/AMD
to
node_modules/wijmo
7 - Create a
wijmo
folder inside
node_modules/@types
8 - Copy the typings from
Dist/controls
(all *.d.ts files) to
node_modules/@types/wijmo
9 - Create a
vendor/wijmo
folders inside the
src
folder
10 - Copy the
wijmo.grid.min.js
,
wijmo.input.min.js
and
wijmo.min.js
files from
Dist/controls
to
src/vendor/wijmo
11 - Copy the
wijmo.min.css
file from
Dist/styles
to
src/vendor/wijmo
12 - Open the
angular-cli.json
file and add
vendor/wijmo/wijmo.min.css
to the
styles
array and
vendor/wijmo/wijmo.min.js
,
vendor/wijmo/wijmo.grid.min.js
,
vendor/wijmo/wijmo.input.min.js
to the
scripts
array.
13 - Open
src/app/app.component.ts
, add references to the typings and import the grid:
///<reference path="../../node_modules/@types/wijmo/wijmo.d.ts"/>
///<reference path="../../node_modules/@types/wijmo/wijmo.grid.d.ts"/>
///<reference path="../../node_modules/@types/wijmo/wijmo.input.d.ts"/>
import * as wjGrid from 'wijmo/wijmo.angular2.grid';
14 -
ng serve
15 - Add the directives:
directives: [wjGrid.WjFlexGrid]
(
that’s when it fails!)
After adding the directives I get the error:
ERROR in ./src/app/app.component.ts
Module not found: Error: Can't resolve 'wijmo/wijmo.angular2.grid' in '/Users/nunoarruda/Desktop/demo/src/app'
@ ./src/app/app.component.ts 14:0-52
@ ./src/app/index.ts
@ ./src/main.ts
@ multi main
I’m using the latest version of Wijmo 5 (v 5.20162.198)
What’s the issue here or what am I missing?