[Ticket cloned from T13015: Change Any Question default name, title, and description]
i also get this error now
cannot read properties of undefined (reading 'initKeyboardShortcuts')
at CreatorComponent.ngAfterViewInit (survey-creator-angular.js:142:22)
at callHook (core.mjs:2577:22)
at callHooks (core.mjs:2546:17)
at executeInitAndCheckHooks (core.mjs:2497:9)
at refreshView (core.mjs:11853:21)
at refreshComponent (core.mjs:12921:13)
at refreshChildComponents (core.mjs:11572:9)
at refreshView (core.mjs:11832:13)
at refreshEmbeddedViews (core.mjs:12875:17)
at refreshView (core.mjs:11806:9)
handleError @ core.mjs:6402
Hani,
Could you please share a problematic sample for research?
actually this error happened after i upgraded from survey-creator-knockout package to survey-creator-angular.
and it doesn't affect anything, but when i inspect the page i can see this error in the console.
but it wasn't there when i was using knockout package.
here is a screenshot of the error
Hello Hani,
Please make sure you followed all the steps to integrate Survey Creator for Angular to your application: https://surveyjs.io/survey-creator/documentation/get-started-angular. You can also find a quick-start application that enables Survey Creator in the following GitHub repository: Angular CLI + SurveyJS Quick Start Boilerplate.
If this doesn't help, please share a minimal reproducible demo for research.
Thanks
and i just found another error,
cannot read properties of undefined (reading 'removeKeyboardShortcuts')
TypeError: Cannot read properties of undefined (reading 'removeKeyboardShortcuts')
at CreatorComponent.ngOnDestroy (survey-creator-angular.js:147:22)
at executeOnDestroys (core.mjs:7591:32)
at cleanUpView (core.mjs:7492:9)
at destroyViewTree (core.mjs:7318:21)
at destroyLView (core.mjs:7470:9)
at RootViewRef.destroy (core.mjs:21923:9)
at ComponentRef.destroy (core.mjs:22340:23)
at RouterOutlet.deactivate (router.mjs:2301:28)
at ActivateRoutes.deactivateRouteAndOutlet (router.mjs:2685:28)
at ActivateRoutes.deactivateRouteAndItsChildren (router.mjs:2658:18)
at resolvePromise (zone.js:1211:31)
at resolvePromise (zone.js:1165:17)
at zone.js:1278:17
at _ZoneDelegate.invokeTask (zone.js:406:31)
at Object.onInvokeTask (core.mjs:26505:33)
at _ZoneDelegate.invokeTask (zone.js:405:60)
at Zone.runTask (zone.js:178:47)
at drainMicroTaskQueue (zone.js:585:35)
at invokeTask (zone.js:491:21)
at ZoneTask.invoke (zone.js:476:48)
h
Both Of the errors are happening in survey-creator-angular component ,
at these lines in the screenshot
Hello Jane,
yes i followed all the steps.
i was debugging for the problem, these errors happens when i fetch the survey from DB.
when it hits
var sub = await this.surveysService.getSurvey(surveyId);
i tried with json file it worked fine.
Hani,
I appreciate your updates. We haven't received similar reports so far. Perhaps, those errors somehow relate to your application configuration.
For me to move forward and determine the cause of these errors, I need to get a problematic demo for research. Please feel free to share it.