@molmi wrote:
Hello,
i have a problem with ng-click. when i try it inside ion-view tags it work very well, but when i place it in top bar nothing happen on click. the code is very simple, when i click on this image a div area is showen, when i click again it dissapears.this is the header code :
<ion-side-menu-content>
<ion-header-bar align-title="left" class="bar-assertive">
<h1 class="title"><a href="#/post/list/0"><img src="img/logo.svg"></a></h1>
<div class="buttons">
<button class="button button-icon button-clear ion-navicon" menu-toggle="right"></button>
</div>
<!-- Probleme here -->
<img class="button button-clear searched" ng-click="showsr()" src="img/menu/search.svg" />
</ion-header-bar>
<ion-nav-view>
</ion-nav-view>
</ion-side-menu-content>
.
.
.and this is my function
$scope.showsr = function(){
if ($scope.showSearchForm == false){
$scope.showSearchForm = true;
}else{
$scope.showSearchForm = false;
}
};Any idea to make it work plaise ?
Posts: 6
Participants: 3