IONIC:无法从两个'ng-repeat`中获取记录

时间:2017-05-20 10:20:32

标签: android html angularjs ionic-framework

我是离子框架的新手。目前我正在研究ionicsidemenu app。我想根据日期显示记录,将日期作为标题,并且各个日期具有多个记录。

为此,我有两个web services一个用于标题日期,另一个用于日期记录。在我的HTML文件中,我有两个ng-repeat一个用于显示标题日期。现在我无法理解如何获取特定日期的记录,因为必须将日期发送到Web服务以获取记录。

我试过这个:

 <div ng-repeat="d in dates track by $index">
 <h2>d.edate</h2>
 <div ng-init="datewiserecords(d.edate);" >
 <div ng-repeat="n in res1  track by $index" class="text-white"  >
 </div></div></div>

但它不起作用。请帮助我。

1 个答案:

答案 0 :(得分:0)

我不确定你在寻找什么,但我理解这个问题的方式让我给你一个解决方案如下:

我的解决方案:

   tabBarComponent: ({jumpToIndex, ...props, navigation}) => (
        <TabBarBottom
            {...props}
            jumpToIndex={index => {
                if (index === 2) {
                    navigation.navigate('camera')
                }
                else {
                    jumpToIndex(index)
                }
            }}
        />

    )

希望这很有用