I have a simple Attribute restricted directive like:
app.directive('akMouseOver', function () {
return {
restrict: 'A',
scope: {
mouseOver: '&akMouseOver'
},
controller: function ($scope) {
},
link: function (scope, elem, attrs) {
elem.bind('mouseover', function () {
scope.mouseOver({ hValue: value });
});
}
}})`
which I am calling on a simple html button as:
<button ak-mouse-over='btnMouseOver('Win Win')' class='btn btn-primary'> Hello There !</button>
And my parent controller method is:
$scope.btnMouseOver = function (hValue)
{
alert(hValue + 'Hello !!!');
}
Here somehow I am unable to pass parameter to parent method. If I make this implementation without parameter is is working and I see alert()
if I mouse over on button.
Looking for passing parameter/s without adding additional attribute/directive/scope variable.