an angular directive for building a simple gallery