过滤ng-repeat以查找规范数组中的特定值

时间:2016-02-01 20:15:53

标签: angularjs ng-repeat angularjs-filter

我有一个对象数组,每个对象都有一个import numpy as np import matplotlib.pyplot as plt filename = ("master.kkids.obslist") data = np.loadtxt(filename,skiprows=14,dtype=str) x = data[:,7] y = data[:,8] u = data[:,18] v = data[:,19] z = data[:,20] x1 = x.astype(float) y1 = y.astype(float) plt.scatter(x,y) plt.savefig('hi.png') 数组。我需要过滤我的对象以获取名称为Specification且其值与另一个变量匹配的规范(例如,值"manufacturer"Asus)。

MSI

示例组件:

<div class="form-group">
  <label class="col-md-2 control-label" translate="{{ 'manufacturer' }}"></label>
  <div class="col-md-10" ng-repeat="componentSpec in search.ComponentSpecifications  | filter:{ SpecificationName: 'manufacturer' }">
    <select class="form-control" ng-model="componentSpec">
      <option ng-repeat="manufacturer in adminCtrl.manufacturers" value="{{ manufacturer }}">{{ manufacturer }}</option>
    </select>
  </div>
</div>

<li class="list-group-item col-md-12" ng-repeat="Component in adminCtrl.content  | filter:search">

0 个答案:

没有答案