Reputation: 21
I am integrating gojs in angular 8 project.
I have already installed gojs-angular package.
npm install gojs gojs-angular.
Below is the code snippet.
public initDiagram(): go.Diagram {};
Error:Cannot find namespace 'go'
Upvotes: 1
Views: 365
Reputation: 380
Either didn't install GoJS properly:
npm install gojs gojs-angular
Didn't import it properly: (most likely this, based on the error type)
import * as go from 'gojs';
Or its missing from package.json
:
"dependencies": { "gojs": "^3.0.11" }
Upvotes: 0
Reputation: 21
Please follow and verify below steps.
npm i gojs gojs-angular
We can just use variable by import in the component.ts file.
No need to add script or import in other places,
Upvotes: 1