# Navigate between db1 and db2

**URL:** <https://discourse.nodered.org/t/navigate-between-db1-and-db2/86626>\
**Category:** Dashboard\
**Tags:** node-red-dashboard, dashboard-2\
**Created:** [20 March 2024 22:56 UTC](https://discourse.nodered.org/t/navigate-between-db1-and-db2/86626 "2024-03-20T22:56:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![powderpuff](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/powderpuff/32/89468_2.png) [@powderpuff](https://discourse.nodered.org/u/powderpuff)\
**Post date:** [20 March 2024 22:56 UTC](https://discourse.nodered.org/t/navigate-between-db1-and-db2/86626/1 "2024-03-20T22:56:45Z")

</div>

I am keeping both dashboards for now but I don't seem to be able to navigate between an old dashboard page and a new dashboard 2.0 page programmatically. I created a button in dashboard 1.0 which changes the page to a dashboard 2.0 (via window.location.href ) but I can't seem to be able to do the reverse, meaning go to dashboard 1.0 page from dashboard 2.0. Is this by design or just not feasible?

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [21 March 2024 08:41 UTC](https://discourse.nodered.org/t/navigate-between-db1-and-db2/86626/2 "2024-03-21T08:41:14Z")

</div>

I don't know of any reason why this wouldn't be possible. Are you using a `ui-template` with an `<a>` in Dashboard 2.0 to do this?

---

<div class="post-metadata">

**Author:** ![powderpuff](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/powderpuff/32/89468_2.png) [@powderpuff](https://discourse.nodered.org/u/powderpuff)\
**Post date:** [21 March 2024 23:06 UTC](https://discourse.nodered.org/t/navigate-between-db1-and-db2/86626/3 "2024-03-21T23:06:15Z")

</div>

I just tried with `<a href = "http://localhost:1880/ui">` and it worked. Thank you. The code I used inside dashboard 1.0 ui\_template to go to dashboard 2.0 was:

```auto
<script>
(function(scope) {
    scope.$watch('msg.payload', function(data) {
		if (data == "yes") window.location.href = "http://localhost/dashboard";
    });
})(scope);
</script>

```

I tried the same code inside a ui-template node from dashboard 2.0 (but replacing the http address) as follows:

```auto
<script>
(function(scope) {
    scope.$watch('msg.payload', function(data) {
		if (data == "yes") window.location.href = "http://localhost:1880/ui";
    });
})(scope);
</script>

```

I probably should have formatted the above code according to the new guideline for ui-template node. I will try that next. Thanks again for your feedback.

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [22 March 2024 07:05 UTC](https://discourse.nodered.org/t/navigate-between-db1-and-db2/86626/4 "2024-03-22T07:05:16Z")

</div>

Yep, you got it. Dashboard 1.0 is AngularJS-based, whereas Dashboard 2.0 is Vue-based, so you will need to re-write your `ui-template` nodes accordingly.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 April 2024 07:06 UTC](https://discourse.nodered.org/t/navigate-between-db1-and-db2/86626/5 "2024-04-21T07:06:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
