# \[Announce\] Dashboard version 2.10.0

**URL:** <https://discourse.nodered.org/t/announce-dashboard-version-2-10-0/4196>\
**Category:** Dashboard\
**Created:** [22 October 2018 18:58 UTC](https://discourse.nodered.org/t/announce-dashboard-version-2-10-0/4196 "2018-10-22T18:58:39Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [8 November 2018 21:20 UTC](https://discourse.nodered.org/t/announce-dashboard-version-2-10-0/4196/31 "2018-11-08T21:20:19Z")

</div>

> [@TotallyInformation](#):
>
> The above works and you can send multiple messages.

@TotallyInformation: It indeed works fine, as long as I keep the code in the template node. But as soon as I use it in my own UI contribution, nothing ... But thanks for spending your time on this one!

> [@nisiyama](#):
>
> Could you try following?

@nisiyama: If have tried your new version of beforeEmit, and that seems to do the job!

Did a simple test by injecting msg.payload = "_Hello world_" or "_Hello mars_" into my UI node like this:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/840df929e209421c1b61b8fbd26d2fbb1f52ede6.png)

When I use now the following code snippet:

```auto
initController: function($scope, events) {
    $scope.$watch('msg', function(newVal, oldVal) {
        console.log('Watch is called ...');
        console.dir(newVal);
        console.dir(oldVal);
        console.dir($scope.msg);
    })
}

```

Then the stuff below is being logged in my Chrome console:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e4ea46739b7b58150a2ea4a06d3525891d66116f.png)

1. When dashboard is loaded in new tabpage, all 3 variables are undefined.
2. When a message (with msg.payload = "Hello world") is injected, the newVal contains the new message and the oldVal is undefined.
3. When a message (with msg.payload = "Hello mars") is injected, the newVal contains the new message and the oldVal contains the old message.
4. When the page is refreshed, newValue contains the **last message** and oldValue is undefined.

So $scope.msg is always equal to newVal (as expected), so we don't need the $scope.msg here anymore.  
And the on-load situation **(1)** can be ignored with a simple IF statement:

```auto
initController: function($scope, events) {
    $scope.$watch('msg', function(newVal, oldVal) {
        if (!newVal) {
            return;
        }

        console.dir(newVal);
    })
}

```

_But I hadn't expected that the refresh situation **(4)** would trigger the watch with an **older** message. Or is that normal behaviour to start again where we left before the refresh?_

It would be useful for other users to add your information to the above wiki page, and perhaps integrate it somehow in the 'reference' ui-list example node ...

Thank you very much!!!  
Bart

---

_[View the full topic](https://discourse.nodered.org/t/announce-dashboard-version-2-10-0/4196)._
