Get array element with condition

Hi,

I am working on AngularJS and have a menu with 5 items ,here is a working pen menu that demonstrates my scenario, I took array of elements and passing item to the function. My requirement is I have to show menu items based on condition.ie. sometimes I can see only 2 items in the menu.How can I achieve in a efficient way in javascript.

Thanks in advance

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.