# Ion-nav-view problem in emulator

**URL:** <https://forum.ionicframework.com/t/ion-nav-view-problem-in-emulator/11922>\
**Category:** ionic-v1\
**Created:** [October 29, 2014, 4:10pm UTC](https://forum.ionicframework.com/t/ion-nav-view-problem-in-emulator/11922 "2014-10-29T16:10:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedronalbert](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@pedronalbert](https://forum.ionicframework.com/u/pedronalbert)\
**Post date:** [October 29, 2014, 4:10pm UTC](https://forum.ionicframework.com/t/ion-nav-view-problem-in-emulator/11922/1 "2014-10-29T16:10:50Z")

</div>

have a problem when I try to use ion-nav-view. When I try to use it, it shows me black screen in the emulator but in ionic serve, it works perfectly for me.

I think it is a syntax error.

Also, when I create a blank project, it works perfectly in the emulator.

index.html

```
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title></title>

    <link href="lib/ionic/css/ionic.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <script src="lib/ionic/js/ionic.bundle.js"></script>

    <script src="cordova.js"></script>
    <script src="js/app.js"></script>
    <script src="js/controllers.js"></script>
    <script src="js/services.js"></script>
  </head>
  <body ng-app="starter" animation="slide-left-right-ios7">
    <ion-nav-bar></ion-nav-bar>

    <ion-nav-view></ion-nav-view>
  </body>
</html>

```

/templates/apps/home.html

```
<ion-view title="Hello World">
    <ion-content>
        <h2>Hello World</h2>
    </ion-content>
</ion-view>

```

app.js

```
// Ionic Starter App

// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.services' is found in services.js
// 'starter.controllers' is found in controllers.js
angular.module('starter', ['ionic'])

.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
    // for form inputs)
    if(window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
    }
    if(window.StatusBar) {
      // org.apache.cordova.statusbar required
      StatusBar.styleDefault();
    }
  });
})

.config(function($stateProvider, $urlRouterProvider) {

  // Ionic uses AngularUI Router which uses the concept of states
  // Learn more here: https://github.com/angular-ui/ui-router
  // Set up the various states which the app can be in.
  // Each state's controller can be found in controllers.js
  $stateProvider

    // setup an abstract state for the tabs directive
    .state('apps', {
      url: '/',
      templateUrl: '/templates/apps/home.html'
    });

  // if none of the above states are matched, use this as the fallbac
  $urlRouterProvider.otherwise('/');
});

```

![](https://sea1.discourse-cdn.com/ionicframework/uploads/default/6976/92a7e4709d41288a.png)

Blank project  
 ![](https://sea1.discourse-cdn.com/ionicframework/uploads/default/6977/01a50f64d0e2b325.png)

---

<div class="post-metadata">

**Author:** ![pedronalbert](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@pedronalbert](https://forum.ionicframework.com/u/pedronalbert)\
**Post date:** [October 29, 2014, 5:55pm UTC](https://forum.ionicframework.com/t/ion-nav-view-problem-in-emulator/11922/2 "2014-10-29T17:55:57Z")

</div>

Fixed, [stackoverflow](http://stackoverflow.com/questions/26634270/ionic-ion-nav-view-crashes-in-emulator/26636854#26636854)
