Problem: Click different buttons to realize local pages pointing to different html displays, and specify controller
Problem: I originally wanted to use instructions two-way binding, but found that the instructions will only be compiled once, Pujie
After that, I used ng-repeat command and found that it could only be compiled once. Pujie
Finally, I used the $complie service to add html, which was successful, but I felt very unhappy because I ended up using jquery
Now I just want to know if there is any other way? ?
Another question is how ng-controller can bind data in two directions, which is similar to ng-controller="{{ctrl}}"
I don’t know if the Pujie plan is my fault or not. I hope to explain it in detail.
1. It is better to use routing to jump to local pages,
ui.router
或者ngRoute
.2. The second one doesn’t quite understand what you mean. Two-way binding of data can be achieved through instructions (
directive
).