angular.js - The role of $scope in AngularJS is equivalent to the adapter in android. Is this description accurate?
伊谢尔伦2017-05-15 17:06:37
0
1
563
$scope is the bridge between the view and the controller, and the adapter is the bridge between the view and the data. However, it is not clear what role the controller plays, so I have this question
Sorry I have never done Android, but according to your description of the Android adapter, it feels like the controller acts as a bridge between the view and the data. angular is a framework with MVVM structure. The ViewModel layer acts as a bridge between views and data.
The two-way arrow refers to two-way binding. ViewModel is the main body of our daily code processing.
Sorry I have never done Android, but according to your description of the Android adapter, it feels like the controller acts as a bridge between the view and the data.

angular is a framework with MVVM structure. The ViewModel layer acts as a bridge between views and data.
The two-way arrow refers to two-way binding. ViewModel is the main body of our daily code processing.