The scene is like this: after clicking the a tag in the view, you enter the details page and trigger the function to make ng-hide="true", but after clicking the upper left corner to return, ng-hide is still false. I think it may be due to caching. I added cache: false in the controller, but it still doesn't work. Please help me. Part of the code is as follows
app.js
$stateProvider.state("tabs.message",{
cache:'false',
reload:'true',
url:"/message",
views:{
"tab-message":{
templateUrl:"templates/message.html",
controller:"messagecontroller"
}
}
});
message.html
<a class="item item-icon-left" ui-sref="tabs.messageinfo" ng-click="alreadyread()">
<i class="icon ion-email"></i>
消息标题放置位置
<span class="badge badge-assertive" ng-hide={{hideflag}} >1</span>
</a>
I’ve redone everything here, forget it