Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49183

Hide content only in Home

$
0
0

@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 return undefined.

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

Read full topic


Viewing all articles
Browse latest Browse all 49183

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>