Hello ionic devs!
I have to say that I find very useful the pattern that the ionic framework has of providing a delegate injectable object for some of its directives. For example the $ionicSideMenuDelegate
object for the ion-side-menus
directive.
I think it is a very powerful and smart way of exposing some of the behaviour that the directive has and opens the possibility to lots of personalisations.
I am a beginner in angular but so far I have never seen anything similar. Is this still some sort of standard practice? Could somebody explain a bit how is this achieved? Sometimes I wish I could do the same with my directives, but taking a look at the ionic framework code I could not totally understand it on my own. Is there a really simple example that helps to get the basic idea?
Thank you very much!
Alex