I am seeking a solution to create a global variable that can be accessed across different Angular2 components and modules. I initially considered utilizing dependency injection in my `app.module` by setting a class with a property, but with the recent angular-RC5 release, this seems like an unnecessarily complex approach for my needs.
Another option I explored was using @Inputs and @Outputs to pass data between components and subscribe to changes, however, it appears that this method does not work seamlessly across modules.
I would greatly appreciate any suggestions on the simplest way to achieve this.
In my specific application scenario, I have a navbar component that should be displayed on all routes except one. To implement this, I have included the navbar in my `app.component` template with an *NgIf condition. I hoped to be able to toggle this condition from various child components without having to include the navbar component in each child module and component, especially considering the complexity of sharing components between modules where some routes are imported in a separate module.