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

Ng-clik don't work in header-bar

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 49186

Trending Articles



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