I am attempting to create a function that will hide a specific box when clicking on a link within that same box.
My goal is to utilize a directive in order to easily add additional functionality once the box is hidden, making it adaptable for other views as well.
I initially tried using an isolated scope but it seems I may have implemented it incorrectly.
For reference, here is a JSFiddle link: http://jsfiddle.net/rJvqf/
In my controller, I have:
$scope.hideLoginBox = false;
Within my view, there is a div with ng-hide="hideLoginBox"
<div ng-app="MyApp">
<div ng-controller="MyController">
<div class="base" ng-hide="hideLoginBox">
<p>outer</p>
<div class="child">
<a href="" my-test="" hidebox="hideLoginBox" >
innner
</a>
</div>
</div>
</div>
</div>
My intention is to use the myTest directive to hide this div when the link is clicked.
I am currently unsure of how to achieve this and would greatly appreciate any assistance provided!
Thank you for your help!
Warm regards, Eric