# data-view-rel-namespace

**声明位置：**

任意 DOM 元素，需要有 `data-view-rel` 属性。

**是否必须：**

否。

**属性取值：**

任意合法的  DOMString 。

例如：

```markup
<!-- 跳转至 b2c-mall 命名空间下ID为 home-page 的视图 -->
<span data-view-rel="home-page" data-view-rel-namespace="b2c-mall">积分商城</span>
```

{% hint style="info" %}
该属性仅当使用 `data-view-rel` 属性声明的跳转目标是视图时有用。
{% endhint %}

{% hint style="info" %}
虽然该属性可以正常工作，但View\.js 建议开发者在 data-view-rel 中使用 `@` 符号指定视图命名空间，从而使代码看起来更为紧凑。
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://attr.view-js.com/data-view-rel-namespace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
