Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are container components in Angular 2

In Angular 2, it says there are two types of components

1) Container Components 2) Presentational Components

I would like to know more about container components.

like image 770
Shivanka Avatar asked Sep 25 '16 13:09

Shivanka


2 Answers

Presentation Components:

They are just dumb components which don't use application logic and are used only for delegation of work like date picker widget..etc

Container Components: They are actual application logic containing components which passes data to other components and child components, which manipulates data, decides how the application behaves

You can refer to other information here

like image 91
AbhiGoel Avatar answered Oct 01 '22 21:10

AbhiGoel


Container components, or smart components, are usually the pages you route to.

They contain service methods to load and manipulate data and pass content to the presentational, or dumb, components inside them.

like image 25
Alexander Ciesielski Avatar answered Oct 01 '22 20:10

Alexander Ciesielski