I have 2 controllers: one for menu(dynamic list of elements we can add/remove) and one for ng-view.
I need to access menu elements from ng-view controller. So, as I understand it right, I should create service so menu objects will be available in any controller, I need just to inject it.
Done.
But!
I need these objects in rendering. So, I should put menu elements in scope of both controllers? That's ugly: I should update it's value each time I update elements in service. Damn.
So, currently it works with rootScope and service, which has method to deal with elements list update/add/remove AJAX. But I think something is wrong here.
Any advices?