I have this in one partial view:
<my-widget id="widget1" fullscreen="true"></my-widget>
And this in another:
<my-widget id="widget2" fullscreen="false"></my-widget>
The component looks like this:
export class MyWidgetComponent implements OnInit {
_this: MyWidgetComponent = this;
@Input() fullscreen: string;
get myModel(): MyModel {
return this.myService.getModel();
}
ngOnInit() {
this.myService.initialize(this.fullscreen);
}
constructor(
private myService: MyService,
) {
}
}
And then in my-widget.component.html I have:
<dx-circular-gauge [value]="myModel.someValue">
...
</dx-circular-gauge>
Everything works fine when there is once instance shown. once I show the second instance of the angular element, and the user changes some things there, myModel.someValue is changed for both widgets, instead of just the one.
The "fullscreen" property has the correct value, for the one widgets it is true, and for the other it's false. What am I doing wrong?