【问题标题】:Parse dictionary in AngularJS在 AngularJS 中解析字典
【发布时间】:2014-09-04 11:31:01
【问题描述】:

我正在我的AngularJS 项目中使用字典。

我想通过league 显示match 的列表,以及上面country 的名称,但是league 的内容不匹配。

如果没有匹配,我不应该显示 country 名称,但我不知道该怎么做...

这是我的代码:http://jsbin.com/hofayowamiha/3/edit

有什么想法吗?

谢谢!!

【问题讨论】:

    标签: javascript json angularjs dictionary


    【解决方案1】:

    您可以添加一个条件,以便不使用 ng-if 呈现块。例如

    ng-if="match.matchs.length != 0"
    

    http://jsbin.com/vidihucihexo/1/edit

    【讨论】:

      猜你喜欢
      • 2014-03-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-05
      • 2016-11-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多