I need to remove sidemenu only on my login page. Otherwise remain. How it can be done? I'm using command ionic ionic start myApp sidemenu
to create the project.
app.js
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('login', {
url: "/login",
templateUrl: "templates/login.html",
controller: 'LoginCtrl'
})
.state('app', {
url: "/app",
abstract: true,
templateUrl: "templates/menu.html",
controller: 'AppCtrl'
})
.state('app.search', {
url: "/search",
views: {
'menuContent' :{
templateUrl: "templates/search.html"
}
}
})
login page
<ion-view title="Login">
<ion-content>
<div class="list">
<label class="item">
<button class="button button-block button-positive" type="submit" ng-click="login()">Log in</button>
</label>
</div>
</ion-content>
</div>
bcn
@Zulu here's my full code. I hope this Ex. work for you.
A little late to the game but this is another option for those (like me) who need to keep their login view within the
side-menu
layout but need to hide the side menu button while keeping the view title.Inside the
login.html
view use theion-header-bar
directive to create a new header with a title and then hide theion-nav-bar
in theside-menu
layout via theion-view
tag.Example (login.html)
Then if you need to disable any drag gestures do so in the controller like @waqas suggests.
This is works for me ...
Ionic 2
it's work, see more here: angular-ui/ui-router
You have to watch the slide menu. If it is open, you have to toggle it and close.