Why not PrimeNG
Armen Vardanyan

Great article, thanks for sharing. We’re using primeng in our project, too. I agree on all counts but one — the bit that goes: “So, if I want the user’s ‘id’ property to be my dropdown value, and the ‘fullName’ to be the label, I have to map my users to a new Array”.

You do, but in a large and scalable application I prefer components to be “dumb” i.e. presentation only — no business logic, data transport nor data transforms.

In this sort of set up you get to have an abstraction layer between the messy, inconsistent and often untrustworthy data coming over http, socket, udp, storage or any other outside source on one hand; and the presentational component on the other. So for the example above I might choose to have a service exposing a data“model” and somewhere in that “model” hierarchy a method to represent a user record in way(s) convenient for my “dumb” component(s).

Found this to be a great read: http://blog.mgechev.com/2016/04/10/scalable-javascript-single-page-app-angular2-application-architecture/

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.