通过IONIC中的Routerlink将值传递给其他综合词
我想将价值传递给另一个compoment ex:一个国家的名称,并在另一个
综合体上使用它,我想将值“法国”发送到另一个compoment(通过datahere):
<ion-card-header>
<ion-img class="logo-flag-greece" alt="mylogo" ></ion-img>
<span routerLink="/tabs/result" dataHere="France" class="text">France</span>
</ion-card-header>
我该如何?那会吗?
I would like to pass value to another compoment ex: a name of country, and use it on the other compoment
I make the link like that and i want to send the value "France" to another compoment (via dataHere) :
<ion-card-header>
<ion-img class="logo-flag-greece" alt="mylogo" ></ion-img>
<span routerLink="/tabs/result" dataHere="France" class="text">France</span>
</ion-card-header>
How can i do that ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的html文件
and in your ts file
和您的结果中
。而是使用“服务”。您可以通过这样的方式将数据传递到另一页。在
in you html file
and in your ts file
and in your result.page.ts file
But I don't recommend this work around. Instead use "service". Your can pass data from one page to another this way. Learn more about service in https://edupala.com/ionic-service/