Answer the question
In order to leave comments, you need to log in
How to do data binding in Angular.js?
There is already a ready-made project in which I am trying to implement Angular.js due to the fact that the site is fully Ajax-based and the template has a complex structure.
To load content, I use my library for jQuery, which hangs an on ('click') event on all links, and so on ...
But here's the problem - after applying the new content, Angular does not want to bind it in any way. On version 1.0.6, angular.bootstrap($('html'), 'ely') helps, but if you take it higher, then the re-initialization did not go through and an error pops up. If this is not done, then the new content will not be associated with Angular in any way (neither directives nor controllers).
What to do?
Answer the question
In order to leave comments, you need to log in
It seems to me that you should learn angular and reconsider your approach to integrating it. From what you described, you only need data-binding, and using angular only for this is stupid ....
ps why hang a handler on all links, if you can do this by delegating the handler to the entire document implement the directive.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question