Mastodon

Angular - Which UI Library to Use

Recently, we decided which UI library we should use in our Angular app. This article is about the aspects we took into account and why we decided to use PrimeNG (spoiler alert!).

PrimeNG was already integrated in the codebase and used in a few places. Because of that, it would have been possible to change to another library if necessary. We didn’t want to use PrimeNG simply because it already has been there, so we compared it to other solutions.

The most important constraint in the context of our project is to use a free library. PrimeNG is free and open source under the MIT licence.

Also, it is under active development: The last commit in the Github repository is just a few days back.

The article „Why not PrimeNG“ actually included some really good thoughts why PrimeNG is a good choice: “Should you still consider PrimeNG for your upcoming projects? Definitely yes […] if you [don’t] need more customization and event bindings”. The article “Why should you choose PrimeNG for Angular UI components?” added some aspects to that, for example that there are different themes available.

Searching for reasons why not to use PrimeNG, the already mentioned article “Why not PrimeNG” lists some reasons, for example missing methods and attributes that make reacting to certain events harder / impossible. One of the many commentaries under the article is from a PrimeNG commiter and states that these are “places to be improved”. Because that discussion is already a little bit older, most of the negative aspects have been fixed now. The author himself commented: “One of the reasons some of the issues from the article have been fixed is the article itself - see their lead’s response to the article :) But to be honest, PrimeNG is awesome and still the best UI component lib out there for Angular.”

Multiple blogs and comments agreed to PrimeNG having missing documentation.

The only real alternative to PrimeNG we could find is Angular Material. Since Angular 6, integrating this library has become easier.

Because there is no real unique feature between those options, we had a look at the components both offered. PrimeNG seems to be more useful with its 63 components, whereas Angular Material “only” offers 34 components.

We couldn’t find any real reason to leave PrimeNG, so we continued using it. However, it is good to have researched alternatives to make a reasonable decision about which library to use.

TL;DR

PrimeNG seems to be the best open source UI library for Angular.