Hello everybody! I'm relatively new here, but have been using Angular for 
roughly 3 years now. However, I'm stumped on how to avoid multiple http 
calls in the ngOnInit method of a material dialog (or any dialog for that 
matter). I'm retrieving a list of data for the form (one of the select 
options) inside my dialog, but it is called every time I open it which I 
view as a bad thing especially if you are editing more than one entity at a 
time (opening multiple dialogs over time). How do you devs handle this 
situation? Do you pass it from your component that calls the dialog so it 
only has one subscription in there? So any data you need in your dialog 
form, you would pull from the parent even if they never open a dialog? It's 
the only remedy I can think of, just don't know how hacky it is.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/52405983-f13a-4fa5-ba60-dd115e459323%40googlegroups.com.

Reply via email to