Add afterToggle callback

I'm fairly new to Angularjs, so I'm not sure what else needs to be done to make this change production-ready and integrated with the minified JS, but this adds the ability to add a callback function.