I am working with django-notification and I am trying to fetch and display the notifications on my angular app. So how should I fetch the data from the backend to make it real-time? Should I periodically fetch data using something like setTimeout? or is there a better way to do this in angular?
you should have two departments ready to achieve this :-
you can use WebSocketSubject rxjs special kind of subject which will let you consume the web socket API,you can read more about this subject to following link.
https://rxjs-dev.firebaseapp.com/api/webSocket/WebSocketSubject