uriel
August 10, 2019, 11:25am
#1
in version 2.* a lot of figures are no longer supplied automatically,
I am using angular application, and I do not want to load the figures.js in the index.html file
I do want to import the file in the component itself.
please help me import this file.
I am using system.js to load the files.
walter
August 10, 2019, 11:53am
#2
I suggest that you copy the extensionsTS/Figures.ts
file into your project.
You might also consider deleting all of its code that you don’t need.
uriel
August 10, 2019, 12:01pm
#3
copying the code is problematic,
because I want to get new version and maintaining code that I did not write sound bad practice
walter
August 10, 2019, 12:14pm
#4
Maybe you need to change the extensionsTS/tsconfig.json
file so that compilation produces the kind of JS file that you want.
uriel
August 10, 2019, 12:24pm
#5
OK, I could load the file.
but I still get
walter
August 10, 2019, 12:26pm
#6
Ah, notice it is loading go.js
whereas elsewhere you are loading go-debug.js
.
uriel
August 10, 2019, 12:33pm
#7
In my System.config.js
I defined
'gojs': 'gojs/release/go-debug.js',
'gojs/extensionsTS/Figures': 'gojs/extensionsTS/Figures.js',
uriel
August 10, 2019, 12:37pm
#8
When I changed go-debug.js
to go.js
it start working,
But I do want to debug it before I work with release.
uriel
August 10, 2019, 3:06pm
#9
Is there a solution for working in debug mode?
walter
August 10, 2019, 4:21pm
#10
Change the import in Figures.ts
to refer to “gojs”, instead of the relative path.
uriel
August 10, 2019, 6:17pm
#11
any chance this is going to be changed in the next version?
walter
August 10, 2019, 9:49pm
#12
We will have to investigate. Does making that change allow you run with the library that you choose?
uriel
August 11, 2019, 3:25am
#13
yes it will,
in my code I import from "gojs"
on development I use the debug version (defined in system.js"
on deploying I change system.js file with the correct version.