I’m attempting to inject NavController and ViewController into either my app.js file or a custom service.
My objective is (or was) to pass the current view into a “LeftMenuManager” service class. Some pages I need the leftmenu to be disabled, others I do not. The LeftMenuManager service would be responsible for flipping the switch based on the view name.
However, I’m unable to inject these dependencies - I get an error about “No provider for NavController…”.
I get the sense that I’m doing something backwards, but I don’t know exactly what. As most people, I’m new at this.
I understand that I’m attempting to inject controllers into non-pages. If this is the case, is there a central “master” page that will be called each time outside of the app.html?
Can someone please help me understand why I can’t do this? Or, if it’s possible, what it is that I’m missing?
Thanks in advance.