angularjs - generate element using ng-repeat but only show if condition met -


I want to generate an element using ng-repeat , but only a few $ range I want to show activeMod is equal to the value of the item, how am I trying here but the ActiveMod value is not mod1 but it is showing all the list items Html code

  & Lt; Ng-show = "item.temel =" = "{{Item.href}}" class = "{{item.className}}" & gt; {{item.title}} & lt; / a & gt; & lt; / li & gt;   

here menu json

  {"title": "system", "menu-mod": "mod1", "className": "" "" "" " "" "" "" "" "Mod": "mod3", "className": "config-icon",}    

try it;

  & lt; Li ng-repeat = "item in menu" ng-show = "activeMod == item ['menu-mod']" ng-if = "item title! = 'Home'" & gt; & Lt; A ng-href = "{{item.href}}" class = "{{item.className}}" & gt; {{Item.title}} & lt; / A & gt; & Lt; / li & gt;   

Hope that activeMod is declared in your controller.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -