I agree to separate them out into separate directives, which makes then easier to manage and makes them portable. Making them all work together may be a bit trickier, but it can be done. I have several directives used for inputs to add the functionality I need, like:
select-on-focus (selects any text entered when given focus) focus-on-show (puts the focus on an element that was hidden but then is shown because of other UI interactions) tab-to (watches keys for Tab or Enter and moves focus to another element) typeahead (based of ui-boostrap's typeahead with some custom functionality) On Wednesday, April 16, 2014 5:03:45 PM UTC-6, Ryan Zec wrote: > > What is the best way to separate out different core pieces of > functionality? > > For example I have a extend component that has auto complete, tagging, and > search query functionality. I would like to separate those pieces of > functionality into separate directives t make it easier to change or even > replacing them if needed. I remeber something being said about helper > directive but never saw any actually implementations. > > A more details question with a code example of my initial idea is here : > http://stackoverflow.com/questions/23119168/how-to-separate-functionality-of-angular-directive > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.