2 个页脚之间的离子切换
Ionic switch between 2 footers
我在页脚中有这个:
<div class="bar bar-footer bar-assertive" ng-show="withdarawStatus">
<button class="button button-assertive" id="applyButton" ng-click="withdraw()">
Successfully Applied! Withdraw?
</button>
</div>
<div class="bar bar-footer bar-positive" ng-show="!withdarawStatus" >
<p id="applyButton" >Application Withdrawn</p>
</div>
我想编写一个函数,当我单击 withdraw() 时,页脚变为 "Application Withdraw" 页脚。
我试过了,但没用,除非我重新加载整个页面。
$scope.withdraw = function() {
$scope.withdrawStatus = true;
}
您的 HTML 有错字 ng-show="!withdarawStatus"
应该是 ng-show="!withdrawStatus"
。这应该可以解决问题。
编辑:这是一个有效的 codepen
我在页脚中有这个:
<div class="bar bar-footer bar-assertive" ng-show="withdarawStatus">
<button class="button button-assertive" id="applyButton" ng-click="withdraw()">
Successfully Applied! Withdraw?
</button>
</div>
<div class="bar bar-footer bar-positive" ng-show="!withdarawStatus" >
<p id="applyButton" >Application Withdrawn</p>
</div>
我想编写一个函数,当我单击 withdraw() 时,页脚变为 "Application Withdraw" 页脚。
我试过了,但没用,除非我重新加载整个页面。
$scope.withdraw = function() {
$scope.withdrawStatus = true;
}
您的 HTML 有错字 ng-show="!withdarawStatus"
应该是 ng-show="!withdrawStatus"
。这应该可以解决问题。
编辑:这是一个有效的 codepen