Pull request for Issue #48

Delegated the modal events to the $root.