I created a service and to encapsulate the functionality of the Spinner plugin.