Im using angularjs, in my code its allready working to hide and show bankregel and document. i added a new div with the same ng-show and hide function but its not coming up. It stays ng-hided. When im clicking on the button it does not change to a block element.

Element 1

<div class="container main-wrapper" ng-init="bankregel=false;">
<div ng-hide="bankregel">
    <table class="table">
        <thead>
        <tr>
            <th>Omschrijving</th>
            <th>Bedrag</th>
            <th>Datum</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-click="selectBankRegel(bankline)" style="cursor: pointer;" ng-repeat="bankline in filteredItems">
            <td style="width:140px; max-width: 140px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;">{{bankline.oms}}</td>
            <td>{{bankline.bedrag}}</td>
            <td>{{bankline.datum}}</td>
        </tr>
        </tbody>
    </table>
</div>

Function selectBankregel

    $scope.selectBankRegel = function(bankline){
    $scope.bankregel = true;
    $scope.selectedBankline = bankline;
    // $scope.$apply();
}

Element 2

<div class="container main-wrapper" ng-init="document=false;">
<div ng-show="bankregel">
    <div class="row bankregel-wrapper">
        <div class="col-12" style="margin-top: 10px; margin-bottom: 10px;">
            <button style="margin-bottom: 25px" ng-click="bankregel=false " ng-show="deviceType == 'iphone' || deviceType == 'ipod' || deviceType == 'ipad' || deviceType == 'webos'" class="btn-fleximaal-dark">Terug naar bankregels</button>
            <button ng-click="document=false"class="btn-fleximaal-dark">Bankregel koppelen</button>
        </div>
    </div>
</div>

Element 3

<div class="container main-wrapper" ng-init="scan=false;">
<div ng-show="document">
   <h1>test</h1>
</div>

Now im trying to create when i click on

<button ng-click="document=false"class="btn-fleximaal-dark">Bankregel koppelen</button>

hide the bankregel element and document element so the scan element can show up.

0 Answers