@JMarqz wrote:
Hi! I'm trying to hide a header buttons if is iPad or if is Home page. I'm trying with
$ionicHistory
but this returnundefined
.JS:
.controller('HeaderButtonsCtrl', function($scope, $ionicHistory) { alert($ionicHistory.currentTitle()); $scope.hideButtons = true; if( ionic.Platform.isIPad() ) { $scope.hideButtons = false; } })
HTML:
<ion-nav-buttons side="right"> <div class="contenedor-botones-header" ng-controller="HeaderButtonsCtrl"> <button ng-hide="hideButtons" class="button btn-notificaciones ng-hide" ng-click="showNotifications()"></button> <span ng-hide="hideButtons" class="header-separador"></span> <button ng-hide="hideButtons" class="button btn-chat ng-hide" ng-click="showChat()"></button> </div> </ion-nav-buttons> </ion-nav-bar>
There is a way to know what page I'm and hide this buttons?
Thanks!Note: I'm having a Login page before Home.
Posts: 2
Participants: 2