Closed IRobot1 closed 2 months ago
<ngt-color attach="background" color="gray"></ngt-color>
migrates to
<ngt-color attach="background" *args="['gray']"></ngt-color>
I used to be able to do this
<ngt-mesh #inst (click)="this.panelSelected.next(inst.instance.value)">
Looks like inst variable is now an NgtMesh which is extends Mesh. I can't do this, because I get a compile error
TS2345: Argument of type 'NgtMesh' is not assignable to parameter of type 'Object3D
<ngt-mesh #inst (click)="this.panelSelected.next(inst)">
Also, I can't do this either, due to a different compile error
<ngt-mesh #inst (click)="this.panelSelected.next(<Object3D><unknown>inst)">
I'm forced to create a function just to handle the type conversion
<ngt-mesh #inst (click)="doclick(inst)">
@Output() panelSelected = new EventEmitter<Object3D>();
doclick(mesh: NgtMesh) {
this.panelSelected.emit(<Object3D><unknown>mesh)
}
Is there a better way to handle this?
Unfortunately, NgtMesh
is an expended type of Mesh
and it is required to have the custom renderer working with property like [position]
and such. What you can do is to cast as $any()
on the template. The type of the EventEmitter doesn't have to change.
Missing with no obvious replacement NgtTriple -
Radian Pipe -
Ready Event -
Value of local variable -instance is no
No documentation for NgtLoader