Home > Article > Web Front-end > How to write variables when passing parameters in url (code)
The content of this article is about how to write variables (code) when passing parameters in the URL. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
<navigator url="../../pages/newsDetail/newsDetail?id={{news.id}}"> <view class="list-item"> <view class="little-item"> <view class="left-box"> <image src="{{news.thumb[0]}}"></image> </view> <view class="right-box"> <view class="title">{{news.title}}</view> <view class="info"> <view class="author-info"> <view class="author-avatar"> <image src="{{news.pubInfo.avatarUrl}}"></image> </view> <view class="author-other"> <view>{{news.authorName}}</view> <!-- <view>{{news.pubInfo.introduction}}</view> --> </view> </view> <view>{{news.like}}赞 {{news.createAt}}</view> </view> </view> </view> </view> </navigator>
Look directly at the first line, write the static part directly in double quotes, and bind the variables with double curly braces.
Related recommendations:
What is vue virtual DOM? Usage of vue's virtual DOM
Front-end case: using js to delete, sort, and filter corresponding rows in the table
The above is the detailed content of How to write variables when passing parameters in url (code). For more information, please follow other related articles on the PHP Chinese website!