-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output for <ngt-canvas /> #71
Comments
The standard Angular component hierarchy differs in this case, as the SceneGraph is not part of Angular’s standard DOM tree or component tree. As a result, it’s not possible to propagate If you need to pass data or events, the recommended approach would be to use a service to handle the communication. |
3.7.0 now adds a @Component({
template: `
<ngt-canvas [sceneGraph]="sceneGraph" (rendered)="onRendered($event)" />
`
})
export class MyCmp {
sceneGraph = SceneGraph;
onRendered(ev: ComponentRef<SceneGraph>) {
// now you can do anything with the ComponentRef
// ev.setInput()
// ev.instance.someOutput.subscribe()
}
} |
@nartc Wow! This opens up endless possibilities. I’m so excited to see what we can do with it! |
I am creating a component in a library which uses
angular-three
Somewhere in the Scene Graph, it emits
output
. I want this to be bubbled up out of the component, into the host app.I added an output on my
SceneGraph
, but I can't see it in<ngt-canvas />
How can I make this work?
The text was updated successfully, but these errors were encountered: