Popup and ion-nav-view don't work togehter


#1

Hi. I have newbie question.

I need some really basic AngularJS in my app. I made my popup work and then added ion-nav-view. Both elements works, but not simultaneously. Now ion-nav-view works perfect, but when i change

body ng-app="starter"

to

body ng-app="starter" ng-controller="PopupCtrl"

app turns into blank site.

It must be some small mistake but i can’t find, where it is. Can anyone help me? My app.js:

angular.module('starter', ['ionic'])
.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    if (window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
    }
    if (window.StatusBar) {
      StatusBar.styleDefault();
    }
  });
})

angular.module('starter', ['ionic'])
  .controller('PopupCtrl', function($scope, $ionicPopup, $timeout) {
    $scope.showAlert = function() {
      var alertPopup = $ionicPopup.alert({
        title: Alert',
        template: 'Alert text'
      });
    };
  });

  angular.module('starter', ['ionic'])
  .config(function($stateProvider, $urlRouterProvider) {
    $stateProvider
      .state('list', {
        url: '/1',
        templateUrl: 'list.html'
      })
      .state('info', {
        url: '/2',
        templateUrl: 'info.html'
      })

    $urlRouterProvider.otherwise("/1");
  })

#2

I have answer here - http://stackoverflow.com/questions/32554721/popup-and-ion-nav-view-dont-work-togehter