As you can see in the above code that array of items is defined in SharedService and two different controllers have access to the same array of items. FirstController is adding item in the array and SecondController is displaying items from the SharedService.