<script src="node_modules/gojs/extenstions/RadialLayout.js"></script> in my index.html file
and as for the div.nativeElement I was merely following the example on the GitHub Repo
I am really not sure if this was the right way to go through hence I have been hacking things around
Edit
As for the div.nativeElement.nativeElement I stand corrected. I have found the mistake and I have corrected it with just the simple this.div.nativeElement in the $() call
After a lot of tackling I finally get an error like this.
Diagram.layout value is not an instance of Layout: RadialLayout()
I have just copied and pasted the code on the Webpage (in Javascript) as it is. I have put a console.log(RadialLayout) which on clicking in dev tools leads me to the right RadialLayout.js file. I cannot wrap my head around this particular error.
I have also tried creating an instance for the RadialLayout by
rdLayout = new RadialLayout();
and passed in into the $() call but then there are problems again.
Are you using the unmodified RadialLayout.js file? That calls: go.Diagram.inherit(RadialLayout, go.Layout) in order to make sure the RadialLayout class extends the go.Layout class.
Perhaps at the time that you load that JS file the value of go is not bound to GoJS namespace.
That proved that TypeScript applications can compile and use classes inheriting from the JavaScript classes defined in go.js.
We’re planning this summer on rewriting all of the extensions in TypeScript. Hopefully that would mean you could more easily import any extension into your TypeScript app. However I know that Angular modules are not the same as JavaScript modules, so I’m not sure if that will help you with your Angular app. But I could translate that one file right now, if you’d like.
OK, I’ve translated extensions/RadialLayout.js and samples/Radial.html into TypeScript. You can get the files at Page Not Found -- Northwoods Software. It includes the resulting compiled *.js files so that you can just open the Radial.html file to run the app without explicitly compiling the TS files.
I hope this satisfies your needs. Please pardon any errors or non-ideal TypeScript code I may have introduced in my haste.
How’s about by the end of this week I am make a GitHub repo of the code and share it with you? Maybe you might also have a clear idea about the things you might want to change in the typescript libraries.
You are most welcome to make any changes for the same. Pardon my bad angular / typescript skills if any within the Repo, as I learned (and still learning) Angular in just 2 weeks.