Add a toggle method to the scope for collapse/expand