If you want to create an expanding element on mouse hover and shrink on mouse leave, you can utilize the ng-mouseenter and ng-mouseleave directives with a custom directive like the one below:
myApp.directive('expando', function () {
return {
restrict: 'A',
scope: {
},
controller: ['$scope', function ($scope) {
$scope.open = false;
}],
link: function ($scope, elem, attrs, ctrl) {
$scope.toggleState = function () {
if ($scope.open) {
$scope.open = false;
} else {
$scope.open = true;
}
};
},
replace: true,
transclude: true,
template: '<div ng-mouseenter="toggleState()" ng-mouseleave="toggleState()"> <span ng-hide="open" class="sectionIndicator">+</span> <div ng-show="open" class="inline" ng-transclude></div> </div>'
};});
This directive should fulfill your requirements. You can see an example in action in this fiddle - http://jsfiddle.net/LukeMaso/LwFws/