Adding functionality on top of ionic

Is anyone knows how to expand ionic’s functionality.

Like, I want to create an ionic gallery on top of ion-scroll. I wan to create directive for it and use ion-scroll as its child. And new directive will provide new functions like next or previous slides or whatever.