O'Reilly logo

AngularJS Directives by Alex Vanston

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Further steps

With that, we'll conclude our walkthrough of the development of a directive, however there are of course several other features and improvements left to add. If you want to experiment on your own, a few starting ideas might include adding the ability to transclude existing content elements into your grid or even allow certain elements to be stamped, which is Masonry's term for gluing one or more elements in place and then laying everything else out around them. Finally, if you want to experiment with controllers, try replacing our elements watcher statement with a controller function that each element directive calls when it initializes and ensure that the initOrUpdateMasonry method only fires when all the elements are ready. If ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required