I'm new to AngularJS and understand the basic principles. However, I'm having a case now where I don't yet know how to get to the solution.
Let me briefly explain you the case. Let's say you have a supermarket webshop where there is an input box where you can type to search for your food. Next to the input box, there is an icon that displays a modal on click with all the most ordered foods.
This modal has it's own controller and the searchpanel in which the inputbox is has it's own controller.
Now when a food is sold out this gets striked through in the modal. But when every popular food is sold out I want the modal not to show on click.
I thought I could assign a variable to the scope of the modal but then I couldn't access it in the scope of the searchbar. I could work with rootScope I think, but I would really like to know if there is a better solution.
Thanks in advance and if you need more info, please let me know.
adev