search

Home  >  Q&A  >  body text

angular.js - The role of $scope in AngularJS is equivalent to the adapter in android. Is this description accurate?

$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

伊谢尔伦伊谢尔伦2798 days ago540

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-05-15 17:08:37

    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.

    reply
    0
  • Cancelreply