When I try to change state programatically, the url changes, but view is not loaded. After giving a refresh it loads perfectly, but reloading it using $window.location.reload(true);
seems bit unusual.
This is my controller:
myApp.controller('WelcomeController', ['$scope', '$state', '$window',
function($scope, $state, $window) {
$scope.changePage = function() {
$state.go('signup');
// $window.location.reload(true);
};
}
]);
This is in my states:
$stateProvider.state('signup', {
url: '/signup',
templateUrl: 'templates/signup.html',
controller: 'LoginController'
});
This is working just fine:
<a class="button" href="#/signup">Sign In</a>
What might be the issue here? I’m new to ionic or angular and literally stuck here for two days.