Angular tries to avoid DOM operations. Functions such as drag and drop can modify data and apply it to elements through ng-style. A better solution would be to implement it by defining instructions
My suggestion is: If it is a large-scale interactive operation, such as dragging a tree structure with thousands of children, then it is best for you to save a temporary data and then update the DOM at once. If you rely on Angular's data binding, the browser will probably hang. If you have just dozens or hundreds, you can directly use the ng-xx directive to implement interactive logic using data.
PS: When Angular does data synchronization, a watch will be generated for each place that requires data binding, so the thousands and hundreds mentioned above refer to the number of watches.
Angular tries to avoid DOM operations. Functions such as drag and drop can modify data and apply it to elements through ng-style. A better solution would be to implement it by defining instructions
My suggestion is: If it is a large-scale interactive operation, such as dragging a tree structure with thousands of children, then it is best for you to save a temporary data and then update the DOM at once. If you rely on Angular's data binding, the browser will probably hang.
If you have just dozens or hundreds, you can directly use the ng-xx directive to implement interactive logic using data.
PS: When Angular does data synchronization, a watch will be generated for each place that requires data binding, so the thousands and hundreds mentioned above refer to the number of watches.