-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Context
Using Orb in an Angular 17 component:
export class ApplicationsComponent implements AfterViewInit {
@ViewChild('graph')
graphElement!: ElementRef<HTMLDivElement>;
orbInstance!: Orb;
reload() {
this.orbInstance.data.setup({
nodes: [
{id: "foo", label: "Test App"}
],
edges: []
})
this.orbInstance.view.render(() => {
this.orbInstance.view.recenter();
});
}
ngAfterViewInit(): void {
this.orbInstance = new Orb<Node, Edge>(this.graphElement.nativeElement)
this.reload();
}
}Problem
When constructing new Orb in ngAfterViewInit(), it tries to load a worker file using a GET call to the following URL:
The following error occurs:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
Question
It seems that Orb is trying to load a webworker or similar, but this URL doesn't exist (content of index.html is returned). Is it possible to preload the worker or supply it under a different path? Is there any configuration to change or deactivate this behavior? If not, can it be changed?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels