Mandar Shinde

Mandar Shinde

  • NA
  • 423
  • 115.6k

Regarding Calling Function After Content View

Apr 16 2019 3:39 AM
Dear All,
While passing  some values from one component to another component in Angular 5. I am facing one problem is that I am calling one function inside constructor in that what I am doing is just print values which comes from database using ASP .Net MVC, for example suppose I want to print ID then there 
 
document.getElementById('lblID')['textContent'] = value;
 
while debugging I get come to know that it is happening because of content is still not get loaded and I calling that function so because of that I am getting error. 
 
If I refresh that page then I am getting all appropriate values without having any error.
 
I have tryied all LifeCycle Hook of Angular. On wihct event I should call that function?
Please let me know any solution if you have.
Thanking You in Advance. 

Answers (1)