# Integrating vtk.wasm with angular

**URL:** https://discourse.vtk.org/t/integrating-vtk-wasm-with-angular/11007
**Category:** Web
**Created:** [March 19, 2023, 2:50pm UTC](https://discourse.vtk.org/t/integrating-vtk-wasm-with-angular/11007 "2023-03-19T14:50:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wayne-christopher-an](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wayne-christopher-an/32/6082_2.png) [@wayne-christopher-an](https://discourse.vtk.org/u/wayne-christopher-an)
#### Post date: [March 19, 2023, 2:50pm UTC](https://discourse.vtk.org/t/integrating-vtk-wasm-with-angular/11007/1 "2023-03-19T14:50:27Z")

</div>

I have an app that uses vtk.js inside angular, and it’s working well. I am trying to migrate to vtk.wasm and am wondering if there are any examples available of integrating angular and vtk.wasm. I think I’m having problems with events getting passed through to the vtk code (mouse, expose, etc).

Thanks in advance…

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [March 20, 2023, 7:20am UTC](https://discourse.vtk.org/t/integrating-vtk-wasm-with-angular/11007/2 "2023-03-20T07:20:47Z")

</div>

@jaswantp

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [March 31, 2023, 11:44pm UTC](https://discourse.vtk.org/t/integrating-vtk-wasm-with-angular/11007/3 "2023-03-31T23:44:09Z")

</div>

Hi @wayne-christopher-an

There are examples of how to setup the build system and code for VTK.wasm in general. However, I cannot think of anything with angular.

1. There are many examples in VTK itself. See [Examples/Emscripten/Cxx](https://gitlab.kitware.com/vtk/vtk/-/tree/master/Examples/Emscripten/Cxx)
2. The [vtk-wasm-docker/README.md](https://gitlab.kitware.com/vtk/vtk-wasm-docker) shows how one might structure a dev/production toolset using kitware/vtk-wasm docker image.
3. The [vtkWasmBenchmark](https://github.com/jspanchu/vtkWasmBenchmark) is a complete example that uses more JavaScript and HTML, less C++.

I think the last example can give you ideas for better integration and functionality.

About events and mouse, you might want the canvas to have focus. See [vtkWasmBenchmark/blob/main/web/index.js#L448](https://github.com/jspanchu/vtkWasmBenchmark/blob/main/web/index.js#L448)
