0

I have root component in my hierarchy, called "root-app". Also i have router and few components, which loaded by this router. Than i have a service, which control page navigation. I need to get one element

<img #animationDetails src='..' alt=''>

from each component after it is loaded, from this service. How i can get element from service after it is loaded by router.

Peter
  • 10,492
  • 21
  • 82
  • 132

1 Answers1

0

You cant get DOM elemnt form service. I wonder why would you even need to get the element from service. You can manipulate the DOM when services return the observables inside component callbacks. Take a look at this question on how to perform DOM manipulation from components in Angular: How to perform DOM manipulation in Angular components

Peter
  • 10,492
  • 21
  • 82
  • 132