How to Initiate modal to open automatically?

Thanks for the link. However I am new in angular js, so the code you referred need some time for me to understand.

Here is my attempt from your codepen,

.controller('MyCtrl', function($scope, $ionicModal, $timeout) {
    $ionicModal.fromTemplateUrl('modal.html', function($ionicModal) {
    $scope.modal = $ionicModal;
    }, {    
    scope: $scope,    
    animation: 'slide-in-up'
  });
  $scope.openModal = function() {    
    $scope.modal.show();
  };
  $scope.closeModal = function() {    
    $scope.modal.hide();
  };
  $timeout($scope.openModal, 10);
}) 

However this opens 2 modal windows? Any thoughts?