P
P
Pogran2016-11-23 14:19:01
Angular
Pogran, 2016-11-23 14:19:01

How to add a call to this JS in the component?

I have a component and after loading it, I need to add js like this prntscr.com/darhqs . Now I include it in the index.html file, but nothing happens, because it works even before my component has loaded

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2016-11-23
@Pogran

It is necessary to implement OnInit in the component and run this script in the ngOnInit method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question