我想通过传递home.ts中列表的索引来使用list.ts的slideTo()函数
home.ts
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
<soapenv:Header/>
<soapenv:Body>
<ns:getUser soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<authentication xsi:type="ns:authentication">
<!--You may enter the following 5 items in any order-->
<dolibarrkey xsi:type="xsd:string">superuser api key</dolibarrkey>
<sourceapplication xsi:type="xsd:string"></sourceapplication>
<login xsi:type="xsd:string">your login id</login>
<password xsi:type="xsd:string">your pasword</password>
<entity xsi:type="xsd:string">your entity</entity>
</authentication>
<id xsi:type="xsd:string">user id's under your entity</id>
<ref xsi:type="xsd:string"></ref>
<ref_ext xsi:type="xsd:string"></ref_ext>
</ns:getUser>
</soapenv:Body>
</soapenv:Envelope>
list.ts
export class HomePage {
@ViewChild(Slides) slider: Slides;
Something: string;
newsData: any[];
item: any;
constructor(public navCtrl: NavController, private httpProvider:HttpProvider )
{
}
toggleDetails(newsData,i) {
this.navCtrl.push(ListPage)
ListPage.slider.slideTo(2, 500);
}
}
我想通过从home.ts中的列表传递的索引打开list.ts滑块