title: Close ,opened particular modal on page loads in angular-ui bootstrap
body: <p>i have a code in routing like this</p>
  
  <pre><code>   .state('resetPassword', {
                  url: '/home/reset_password',
                  templateUrl: 'home/home.html',
                  controller: 'HomeController',
                  controllerAs: 'vm',
                  data: {
                      requireLogin: false /* This is what tells it to require authentication */
                  },
                  onEnter: function($state, $uibModal) {
                       var mymodal=$uibModal.open({
                          backdrop: true,
                          templateUrl: 'login/resetpassword.html',
  
                      }).result.finally(function() {
                          $state.go('home');
                      })
  
                  }
              })
  </code></pre>
  
  <p>and close button markup</p>
  
  <pre><code>&lt;div class="reset_section" ng-style="reset"&gt;
              &lt;span class="modal_close" ng-click="modalClose()"&gt;
          &lt;i class="material-icons"&gt;close&lt;/i&gt;
  </code></pre>
  
  <p>this will open the modal on page loads, but the issue is, i can't able to close the modal by calling the function modalClose(),  it is showing  <code>$uibModalInstance is not defined</code> and also i need to open one more modal in the same page. after resetting the password, there is one button to login, after clicking the login button.it need to open login popup and have to close the reset password popup.How to do it, can anyone please help me </p>