Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个数组:[1, 2, 3, 4, 5]
[1, 2, 3, 4, 5]
使用 ng-show(例如ng-show="foo == bar"),您将如何确定一个数字是否等于数组中的这些数字之一?
ng-show="foo == bar"
假设你有数组foo并且数字是 118 所以这应该可以工作
foo
ng-show="foo.indexOf(118) != -1"