Angular 8 Shapediver integration error

Hi Guys,

My developer is experiencing this error when running Shapediver on Angular 8:

Here is the code that we are running:

import { Component, ViewChild, AfterViewInit, ElementRef } from ‘@angular/core’;

selector: ‘app-shapediver’,
templateUrl: ‘./shapediver.component.html’,
styleUrls: [’./shapediver.component.scss’]
export class ShapeDiverComponent implements AfterViewInit {
window: any;
@ViewChild(‘sdv’) sdv: ElementRef;

ngAfterViewInit() {
this.window = window;
// let _container = document.querySelector(’.approach__shapediver’);
let settings = {
container: this.sdv.nativeElement,
modelViewUrl: ‘eu-central-1’
// See for all settings available via the constructor.
this.window.api = new this.window.SDVApp.ParametricViewer(settings);

What are we doing wrong?

Thank you for your help in advance!


Jonas Blazinskas

Some of our users had a similar issue when trying to integrate the viewer in React. You could have a look at the React example we built, as well as the associated forum topic.

Hopefully that points you towards a solution. If you end up with a minimal working Angular example, that would be really useful! In that case, you could share your findings here and I’ll add it to the documentation.

Hi Mathieu,

I’ve forwarded the message to the developer, we have a working version done with react but it does not seem to work with Angular 8. Maybe Alexander could give a simple example of implementation in Angular 8, because we suspect something might not working as intended? Thank you for your help in advance!


Jonas Blazinskas

Hi @Jonas-Blazinskas, I just realized that you are probably using an old version of our viewer (2.14.0). Support for React was introduced in 2.16.0. Please try using the latest version which is 2.19.3 as of today. You can find the latest version by following this link: