Adding $destroy handler to make sure the widget is destroyed when the scope is detroyed.