Updated with framework used for ionic-1.0.0-beta.9 example
Readded back onDestroy related code