I want to call a function on my main application class on a controller
I have tried
MyAppName.app.fuctionName();
and
MyAppName.app..getApplication().fuctionName();
Both give me the error
Uncaught TypeError: Cannot read property 'id' of undefined
AbstractMixedCollection.js:135
However when I trace the application via
console.log(MyAppName.app);
The application class is in the console and I can see my function as part of the class.
Any ideas? or a better way to have a controller call a function on the application class?