Navigate between db1 and db2

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?

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?

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:

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

<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.

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.

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