When building Angular 2 applications, we spend most of our time writing components. There are also other kinds of other kinds of directives we can define, but in my experience you end up needing to do that surprisingly rarely.
But recently I did end up in a situation where I needed a custom directive. I was using ngFor to render a collection of items, and I wanted to not keep track of items changing positions inside the collection. Instead I wanted a repeater directive that only adds and remo...
Published on March 05, 2016 22:24