1

I am creating a series of tabs with the following code:

<div ng-cloak ng-repeat="feed in feeds" ng-click="test($index + 1)" class="tabSAM" style="padding: 6px 14px;" id="tab{{$index+1}}" ng-class="tab === ($index + 1) ? 'active': 'nonActive'">{{feed.name}} </div>

There is one tab that I would like to only display when certain criteria are met based on some session variables that I have set. In vbscript my variables are set like this:

<% If s_DivKey = 36 OR s_Key = 1141 OR s_Key = 1618 Then %> 

I need a way to combine these variables with AngularJS to show the Sales Tab only when the session variables are met.

1 Answer 1

1

you can try to use ng-show directive once those requirements are met

https://docs.angularjs.org/api/ng/directive/ngShow

------------EDIT-------------------

You could try to store your session variables in a service or factory, then consume that service from the controller and then just check that your conditions are met in the ng-show directive

Sign up to request clarification or add additional context in comments.

1 Comment

I am just not sure how to combine my session variables with the ng-show.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.