mercredi 10 octobre 2018

How to integrate ngx-treeview into already existing Angular app

I'm able to clone ngx-treeview Demo app and test the same. When I tried to integrate the component in new Angular app, using below steps I got errors :

  1. npm install ngx-treeview --save
  2. Imported TreeviewModule in App.Module
  3. Placed ngx-treeview in HTML
  4. Populated config and items variable in Typescript.

First Issue : Not able to recognize TreeviewItem (in TypeScript) Solution : Manually copied "lib" and "testing" folders to my src folder

Second Issue : When starting the server "ng serve", then it displays below error ERROR in src/testing/jasmine-matchers.ts(18,37): error TS2503: Cannot find namespace 'jasmine'. src/testing/jasmine-matchers.ts(119,5): error TS2304: Cannot find name 'jasmine'.

Is there any steps that I can follow to implement ngx-treeview component in my existing application.




Aucun commentaire:

Enregistrer un commentaire