Home  >  Article  >  Web Front-end  >  How to write variables when passing parameters in url (code)

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

不言
不言Original
2018-08-09 17:15:214805browse

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!

Statement:
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