Revive is a transcluding directive that enables you to turn any clickable surface in you html into a select-like control with the addition of a few events. Revive is ng-model enabled directive, so it is easy to incorporate it into the application model. Other capabilities of the directive are:
Below is a simple implementation of the Revive directive. With the implementation of a few (4) events, it brings to live a collection of div elements that, orchestrated by Revive, exhibits a select-like behavior.
Selected regions:
{{mapSelections}}
Number of selections: {{maxSelections}}
Group and Sort is another transcluding directive that lets you group a set of objects into categories and sub categories. You can create as many levels of categories and sub categories as you need. Your objects need not be fully categorised, i.e. you can have objects at the same level as sub categories. Categorising objects is done by a callback - so there is no holding you back on grouping your objects any way you want.
Once you are done grouping objects into categories, you can sort categories and items, so they are ready to be consumed by your representational directive. Sorting of categories and items is done by callbacks, too - so, you can easily sort categories and items in a way most suitable for your needs
The dropdown menus above, demonstrate 2-level grouping and sorting. Professional Baseball teams are categorised into confrences (leagues) and then into divisions (Sub categorised). Finally, categories and teams (in each division) are sorted in ascending alphabetic order. On the left you can also see the leagues in table view.
If this were a sporting site, a more suitable sorting of divisions would be geographically, while teams would be sorted by wins. This, too, can easily acheived by the Group and Sort.
The Universal Angular Select is not a directive into itself, but a composition of the Revive and Group and Sort directives with a representional directive of your choice. The composition of the two directives provides you with a powerfull Select directive.
Below are three different Combobxes implementations, all were created using the Universal Angular Select. The two on the right are conventional comboboxes, while the one on the left is an example of non-conventional select that can be easily created by combining the Revive and Group and Sort directives into a Universal Angular Select
The Universal Angular Select is not a directive into itself, but a composition of the Revive and Group and Sort directives with a representional directive with your choice. The composition of the two directives provides you with a powerfull Select directive.
Advantages of using the Universal Angular Select