Angular 1.x (AngularJS) was following more or less the MV* design principle because of its two-way data binding functionality.
Angular2 is adopting a component-based UI, a concept that might be familiar to React developers. In a sense, the Angular 1.x controllers and directives blur into the new Angular 2 Component.
This means that in Angular 2 there are no controllers and no directives. Instead, a component has a selector which corresponds to the html tag that the component will represent and a @View to specify an HTML template for the component to populate.
Angular2 still implements two-way data-binding but does not consist of models for example if I have a @Component
that displays a list of articles and a class
that defines the article object:
class Article {
title: string;
link: string;
votes: number;
constructor(title: string, link: string, votes?: number){
this.title = title;
this.link = link;
this.votes = votes || 0;
}
This, in the MVC pattern would be considered the model.
So considering this what design pattern does Angular
follow the closest?