I'm new at ionic and angular. I try to create a post status like Facebook, my first task is when user type any text and press POST button I want text in input field disappear, but it disappear in first time when this view is new load. When I try to type any text in input field and press POST button, text won't disappear but function in controller was called. Past, I use label tag but when I press POST button ng-click didn't work so I change label tag to div tag but It work at first time as I say above and I include cache is false it didn't work too . Here is my Plunker
, This issue is in Chat view. Thank everyone for your help!
The ng-model should be bound to an object and not to an variable.
The means the the declaration of the variable should be something like:
$scope.input = {
saySomething : 'Some question'
};
The input field should then be:
<input type="text" placeholder="Say Something" ng-model="input.saySomething"/>