Hi. i think that this is the right category to post this. If not, please accept my apologies. I am fairly new to ionic and angular. I created a project using the sidemenu template. I changed it so that the default page that loads is the login page (different than the one supplied on the template). When the login is successful, the “main” page load. However, it loads with the back button (< Back) next to the side menu icon. I do not know how to make the back button not show up on the main page.
Here’s my login.html
<ion-view title="{{ Title }}">
<ion-content class="has-header">
<div class="list">
<div class="button-bar">
<a class="button button-balanced" href="#/app/signUp">Create new account</a>
</div>
<p> </p>
<p> </p>
<div style="color: red; font-size: medium;" align="center"> {{ message }}</div>
<label class="item item-input">
<input type="email" ng-model="user.email" placeholder="Email" required>
</label>
<label class="item item-input">
<input type="password" ng-model="user.password" placeholder="Password" required>
</label>
<p> </p>
<div class="button-bar">
<a class="button button-clear button-positive" ng-click="login(user)">Login</a>
</div>
</div>
</ion-content>
</ion-view>
Here’s my controller.js
.controller('LoginCtrl', function($scope, $state, UserFactory) {
$scope.Title = "Login";
$scope.login = function(data) {
var result = UserFactory.validateUser(data);
if (result) {
$state.go('app.upcomingGames');
}
else {
$scope.message = "E-mail / Password entered is invalid";
}
}
})