I am trying to hide my div that has id=\"crossfade\" where there is an ng-click event.
1) Is this possible? 2) What am I doing wrong?
If they are in the same controller you can just set a scope variable to ng-hide. something like:
$scope.hideCrossfade = false;
function getData(mType) {
$scope.hideCrossfade = true;
}
and in your html
If your header controller and content controller are split up, you will want to use a $broadcast
in your headerController:
$scope.getData = function(mType) {
$scope.$broadcast('hideCrossfade', true);
};
and in your content controller
var deregisterFn = $scope.$on('hideCrossfade', function($event, hide) {
$scope.hideCrossfade = hide;
};