refactored the code to bring the ion-nav-view in