Why do the codes in the watch only run once? How can I address this issue?
this.$rootScope.$watch('tabType', () => {
if (this.$rootScope["tabType"] === TabType.Sent) {
this.$scope.refreshSentList();
} else if (this.$rootScope["tabType"] === TabType.Archive) {
this.$scope.refreshArchiveList();
} else if (this.$rootScope["tabType"] === TabType.Inbox) {
this.$scope.refreshInboxList();
} else if (this.$rootScope["tabType"] === TabType.Snooz) {
this.$scope.refreshSnoozList();
} else if (this.$rootScope["tabType"] === TabType.Trash) {
this.$scope.refreshTrashList();
}
},true);