Z
Z
zhivulinal2016-08-03 18:51:07
JavaScript
zhivulinal, 2016-08-03 18:51:07

AngularJS + jQuery find() how to find an element in a view?

Just got started with Angular. There is a question: how to find an element using jQuery.find()
I try to search in the container into which views are thrown ...
I am also just getting acquainted with MVC logic, maybe someone will tell you something sensible ...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nicholas, 2016-08-03
@healqq

If you are attaching a plugin, wrap the plugin in a . In Angular, all work with the DOM must be done in directives. Inside the directive in the link function, one of the parameters is the element.

S
sugadu, 2016-08-03
@sugadu

For lookups by tag name, try instead angular.element(document).find(...) or $document.find(), or use the standard DOM APIs, eg document.querySelectorAll().
https://docs.angularjs.org/api/ng/function/angular...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question