Hi. I’m trying to use Angular to develop a custom widget for Tago.IO using VSCode and have a sample (non-Tago.IO) Angular app compiling & running OK. I also have the @tago-io/custom-widget node module installed in a simple Angular app, but I’ve been unable to get past the following issue: When I import “@tago-io/custom-widget” I always get the following error at runtime:
ReferenceError: window is not defined
at eval (/…/NgHello1/.angular/cache/20.2.1/NgHello1/vite/deps_ssr/@tago-io_custom-widget.js:333:5)
at eval (/…/NgHello1/.angular/cache/20.2.1/NgHello1/vite/deps_ssr/@tago-io_custom-widget.js:498:5)
at eval (/…/NgHello1/.angular/cache/20.2.1/NgHello1/vite/deps_ssr/@tago-io_custom-widget.js:499:3)
at async ESModulesEvaluator.runInlinedModule (file:///…/NgHello1/node_modules/vite/dist/node/module-runner.js:910:3)
How does one handle the global ‘window’ object for Tago.io custom widgets with Angular? Also, are there any good examples (or code skeletons) of how to write a custom widget for Tago.io in Angular available somewhere?
Thanks again for the community support!