I had an onHold() event handler assigned to items in a ng-repeat list. The handler call is used with a parameter which is the list item. In the event handler there’s a confirmation dialog that takes some action on the item depending on user selection. The code is something like this:
I’ve got idea of a new function for the onHold() and here comes the Popover. I’ve thought out that I could show a popover on an item hold event with a menu that would allow a user to select an action (e.g. item delete or add to favorite). I can show the Popover in onHold() with a simple call to the show() method, but I don’t understand how to pass the item to the popover while it expects $event. The examples in docs and on codepen are very simple that I can’t think out how to utilize the popover. Culd you please help me?
This does not work can you help me with the $scope inside a popover? it does not seem to be reachable!
(Example here : http://codepen.io/anon/pen/DhlfK )
the popover does have its own scope, thats the reason you can not see myvar
But there is an easy solution:
change the way you prepare your popover and add the scope like this: