JS: Angular is running in development mode. Call enableProdMode() to enable production mode.
JS: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'TNSCanvas' of undefined
JS: TypeError: Cannot read property 'TNSCanvas' of undefined
JS: at new Canvas (file: src\webpack:\frontend\node_modules\@nativescript\canvas\Canvas\index.android.js:31:0)
JS: at ViewUtil.createView (file: src\webpack:\frontend\node_modules\@nativescript\angular\fesm2015\nativescript-angular.mjs:1518:21)
JS: at NativeScriptRenderer.createElement (file: src\webpack:\frontend\node_modules\@nativescript\angular\fesm2015\nativescript-angular.mjs:2082:35)
JS: at file: src\webpack:\frontend\node_modules\@nativescript\angular\fesm2015\nativescript-angular.mjs:1946:39
JS: at _ZoneDelegate.invoke (file: src\webpack:\frontend\node_modules\zone.js\fesm2015\zone.js:372:0)
JS: at Zone.run (file: src\webpack:\frontend\node_modules\zone.js\fesm2015\zone.js:134:0)
JS: at runInRootZone (file: src\webpack:\frontend\node_modules\@nativescript\angular\fesm2015\nativescript-angular.mjs:1939:21)
JS: at NativeScriptRenderer.descriptor.value (file: src\webpack:\frontend\node_modules\@nativescript\angular\fesm2015\nativescript-angular.mjs:1946:19)
also added require('@nativescript/canvas-polyfill') just in case in main.ts, but no success.
is it something I am setting up wrong ? I tried to copy the documentation part a bit of demo-angular/canvas-three but even tho I double checked all, it looks like I can't get it running
Sorry if this question is a miss implementation.
I would like to try to setup NativeScript/canvas and NativeScript/canvas-three in my Angular Native Script project.
Current dependencies are
I am using Android API 32, and a virtual emulated device.
My code is
shared.module.ts
home.component.html
home.component.ts
All I get is
I tried using
This works, but
ready
is never fired, onlyloaded
and the object reference is empty so I can't find a easy way to get the context.throw the same error as above.
also added
require('@nativescript/canvas-polyfill')
just in case in main.ts, but no success.is it something I am setting up wrong ? I tried to copy the documentation part a bit of demo-angular/canvas-three but even tho I double checked all, it looks like I can't get it running