Tagify is a cool pure javascript lib, written by Yair Even Or. Tagify transforms an input (or teaxtarea) into a tags ui component.

After a quick talk with Yair (which is also a co-worker of mine) I promised I’ll wrap his cool lib with an Angular module so that Angular users could integrate it quickly in their apps.

So at first by looking at Tagify’s api it was clear to me that I had to supply the user:

The ui component which will accepts possible “settings” as an input, and will emit upon adding/removing tags. A service which will be used by my component to instantiate once the Tagify object which is actually the api I need to work in front of, and will expose other functionalities to my module consumer app such as: addTags and removeAllTags etc..

Afterwards when had the module done, I wanted to pack and deliver it to Yair so he could use it on his repo, to do so I used ng-packagr which generated a dist folder with the ngTagify module bundle and .d.ts files needed :) and I packed it into an npm package by running npm pack.

Here is the source code repo:

(** disclaimer — I didn’t use the cli library abstraction to pack it, I don’t think that option was integrated in angular.json at the time. nowadays I’m using the cli for everything. use the cli…)

Enjoy!