In my angular 1.x controller, I have a defined object as follows:
notificationTypes: [ { NotificationType: '*', NotificationTitle: 'All notifications' },
{ NotificationType: '0', NotificationLabel: 'System Alert', NotificationTitle: 'System alerts' },
{ NotificationType: '1', NotificationLabel: 'Pending Task', NotificationTitle: 'Pending tasks' },
{ NotificationType: '2', NotificationLabel: 'Update', NotificationTitle: 'Updates' },
{ NotificationType: '3', NotificationLabel: 'Missed Message', NotificationTitle: 'Missed messages' }
],
This object is currently used to populate various lists on one page. Now, the need has arisen to reuse it on other pages as well. Rather than duplicating this object for each page, I am looking to refactor it so that both controllers can utilize the same list for easier maintenance. I have attempted to declare it within the 'MainApp' module as a constant, factory, and/or directive without success. Can you provide any guidance or insight into what I may be overlooking?