MVC in Angular 1
Angular 1 implements a variation of the classic MVC, which is known by the name Model View ViewModel (MVVM). This pattern describes different roles and communication between the parts:
- Model: This holds the data or acts as data access layer
- View: Like MVC, this is the presentation layer
- ViewModel: This is an abstraction of the view that is bound to the view
The following diagram describes the relationships between those parts with the terminology of Angular 1:
The ViewModel in Angular 1 is an object named: '$scope
' that is constructed by an Angular controller. We do not always interact with this object directly. It's binding to the view ...
Get Angular 2 Components now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.