> For the complete documentation index, see [llms.txt](https://attr.view-js.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://attr.view-js.com/data-view-rel-namespace.md).

# 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 %}
