Home > Web Front-end > JS Tutorial > body text

How to write variables when passing parameters in url (code)

不言
Release: 2018-08-09 17:15:21
Original
4805 people have browsed it

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!