I have a MainView with a Navigator component. The logic for pushing a path is done in Javascript inside a Class named FooterComponent.
/* The function that pushes the path to the router */
var gotoPage = function(args) {
setIcon(args);
router.push( 'feed', {} );
};
Whenever I click the button/icon for navigating to the page I get the following error:
Error message: Uncaught ReferenceError: router is not defined
As the error suggests, I dont have a reference to the router from within the child class FooterComponent. How would I go about to get a reference to the router from within the component?
I tried adding this to the top of the class without any luck.
Yes Palton, there is something missing. The part about “you also have to satisfy the dependencies”. Which is also explained very well in the two links that I posted earlier.