Angular runtime error calling a function inside the render() loop: 'undefined is not an object (evaluating this.watchLocation)'
Clash Royale CLAN TAG #URR8PPP Angular runtime error calling a function inside the render() loop: 'undefined is not an object (evaluating this.watchLocation)' I am creating an ionic-native Angular app, using three.js and I can't call any function inside the render loop. I have tried using different forms for the watchLocation function, such as including it inside the 'init3D' method, but the full watchLocation() method uses ionic-native plugins which do not work if I declare the function inside the function that calls it. I have looked at all the other questions on stack overflow, but those methods did not work for this application. I think the problem is in the creation of the 'watchLocation' method or with calling another function within the render loop of a three.js application. Here is the code (with the changes suggested by @UncleDave): import Component, Input, Renderer from '@angular/core'; import STLLoader from "./stlloader"; imp...