Closed kuncevic closed 1 month ago
A bit more background. I am using SSR and seems this line causing a problem. In Angular native libraries usually you would solve by checking isPlatformBrowser()
.
However I've had to apply that fix in my client code. May be worthwhile referencing that in the docs.
constructor(@Inject(PLATFORM_ID) private platformId: Object) {}
ngAfterViewInit() {
if (!this.chart) {
if (isPlatformBrowser(this.platformId)) {
this.chart = new OrgChart();
}
}
this.updateChart();
}
I've tried to integrate org-chart into an angular app.
Got a runtime error when running npm start:
here is a my repo https://github.com/kuncevic/org-chart-issue