您的位置:首页 > Web前端 > AngularJS

[Angular 2] Angular 2 Smart Components vs Presentation Components

2016-09-20 19:02 399 查看
Both Smart Components and Presentation Components receive data from Services in entirely different ways. Smart Components use constructor injection to lookup the entire service from the injector while Angular 2 Presentation components take the data from
@Input
defined on their component class.

In the app, HomeComponent is smart component, it talks to the service and handle events.

Dump Component likes WidgetOneComponent, it receive input and just displaying the data.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: