Writing A Structural Directive in Angular 2 - Or, how I wrote a customized version of ngFor

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...

 •  0 comments  •  flag
Share on Twitter
Published on March 05, 2016 22:24
No comments have been added yet.