title: Ionic/AngularJS redirect to another page
body: <p>I have login page . When username and password is correct i want to redirect from login page to HomePage.html page.</p>
  
  <p><strong>Login.html</strong></p>
  
  <pre><code>&lt;ion-view view-title="Login" name="login-view"&gt;
    &lt;ion-content class="padding"&gt;
        &lt;div class="list list-inset"&gt;
            &lt;label class="item item-input"&gt;
                &lt;input type="text" placeholder="Username" ng-model="data.username"&gt;
            &lt;/label&gt;
            &lt;label class="item item-input"&gt;
                &lt;input type="password" placeholder="Password" ng-model="data.password"&gt;
            &lt;/label&gt;
        &lt;/div&gt;
        &lt;button class="button button-block button-calm" ng-click="login()"&gt;Login&lt;/button&gt;
    &lt;/ion-content&gt;
  &lt;/ion-view&gt;
  </code></pre>
  
  <p><strong>HomePage.html</strong></p>
  
  <pre><code>&lt;label id="test"&gt;test&lt;/label&gt;
  </code></pre>
  
  <p><strong>controller.js</strong></p>
  
  <pre><code>.controller('LoginCtrl', function ($scope, LoginService, $ionicPopup, $state) {
      $scope.data = {};
  
      $scope.login = function () {
          LoginService.loginUser($scope.data.username, $scope.data.password).success(function (data) {
  
              $state.go('/HomePage'); // This is not working for me
  
          }).error(function (data) {
              var alertPopup = $ionicPopup.alert({
                  title: 'Login failed!',
                  template: 'Please check your credentials!'
              });
          });
      }
  })
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>When i try below code</p>
  
  <pre><code>$state.go('/HomePage');
  </code></pre>
  
  <p>this is not working for me.</p>
  
  <p>I get below exception as below</p>
  
  <pre><code>Error: Could not resolve '/HomePage' from state 'login'
  </code></pre>
  
  <p>How can i reach homepage.html page from login page.</p>
  
  <p><strong>Any help will be appreciated.</strong></p>
  
  <p>Thanks.</p>