1

I am trying to add context menu but value is not populating.

<div class="m-l">
    <a class="item-country text-orange" href="#/app/CountryIps/{{item.data['name']}}/cCode/{{item.data['country-code']}}" target="_blank">
            {{item['data']['name']}}
        </a>
    <a class="item-ip" href="#/app/showIps/{{item.data['name']}}/ip/{{item.data['Ip']}}" target="_blank"><span context-menu="whiteList"> {{item.data['Ip']}}</span> </a>
    <a href="" class="item-type text-orange"> {{item.data['type']}} </a>
    <a class="detail-icon" data-popup-open="popup-1" href="" ng-click="showModal(item)">
        <i class="fa fa-info-circle"></i>
    </a>
</div>

Javascript

$scope.whiteList = [
    ['Add to white list', function($itemScope, $event, ip) {
        whiteList(ip);
    }]
];

Now when I add context from template I got undefined in ip in controller.

2 Answers 2

2
<a onClick="window.location.href='your link'">
Sign up to request clarification or add additional context in comments.

1 Comment

Issue is with context menu not with link.
0

I fixed it by myself to checking values of the $itemscope.

$itemScope.$parent.item.data.Ip

To get the value of the IP from template to controllers.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.