我想通过另一页中的列表索引滑动我的滑块

时间:2017-11-06 12:45:00

标签: angular ionic2 angular2-forms

我想通过传递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滑块

0 个答案:

没有答案