Q:

How to hide a div from angular controller

I have a div in my html like 
<div class="row" ng-show="loginCtrl.showTouchID" >
    <div class="col-xs-12">
                    <button type="button" class="col-xs-12 btn btn-touch-id" data-ng-click="#">
                        TouchID Login
                    </button>
                </div>
            </div>

Now need to check in my controller contructor that whether the device support touch id if it is show the div or else not
  window.plugins.touchid.isAvailable(
            function (msg) {
                navigator.notification.alert('Touch id  supported: ' + msg);
                loginCtrl.showTouchID=true;

            }, function (msg) {
                navigator.notification.alert('Touch id not supported: ' + msg);
                loginCtrl.showTouchID=false;

            });

But this doesnt work well,Can anyone correct me
Below my login controller
  angular.module('heritage').controller('LoginCtrl', LoginCtrl);
    LoginCtrl.$inject = ['$scope','$rootScope', '$state', '$window', 'UserService', 'ServiceHelper', '$stateParams'];

    /**
     * Construct the controller.
     * @param $rootScope the root scope
     * @param $state the state object
     * @param $window the window object
     * @param UserService the user service
     * @returns the controller object
     */
    function LoginCtrl($scope,$rootScope, $state, $window, UserService, ServiceHelper, $stateParams) {

A:

Here is a working JSFiddle:
HTML:
<div ng-app="app" ng-controller="dummy">
    <div class="row" ng-show="loginCtrl.showTouchID">
        <div class="col-xs-12">
            <button type="button" class="col-xs-12 btn btn-touch-id" data-ng-click="setTouch('hello')">TouchID Login</button>
        </div>
        <p>{{loginCtrl.showTouchID}}</p>
    </div>
</div>

JS:
var app = angular.module("app", []);
app.controller('dummy', function ($scope) {
    $scope.loginCtrl = {showTouchID: true};

    $scope.setTouch = function (msg) {
        if ($scope.loginCtrl.showTouchID) {
            alert('Touch id not supported: ' + msg);
            $scope.loginCtrl.showTouchID = false;
        } else {
            alert('Touch id supported: ' + msg);
            $scope.loginCtrl.showTouchID = true;
        }
    }
});

