Answer the question
In order to leave comments, you need to log in
How to intercept a javascript function through Angular 2?
I am learning Angular 2. I previously knew JQuery and JS superficially, so I mainly work with PHP. I'm doing a project on which I'm studying and faced a non-trivial task that I can't even google)
Essence: using http.get.map.subscribe I pull a page and display it on the screen via innerHTML. This block has an on-click handler:
When you click on which, as expected, an error appears in the console:<a href="#" onclick="locateTree('x1234')">Link</a>
Uncaught ReferenceError: locateTree is not defined
at <anonymous>:1:1
(anonymous) @ VM20596:1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question