# How to show modal dialog in template node

**URL:** <https://discourse.nodered.org/t/how-to-show-modal-dialog-in-template-node/611>\
**Category:** Dashboard\
**Created:** [5 June 2018 02:37 UTC](https://discourse.nodered.org/t/how-to-show-modal-dialog-in-template-node/611 "2018-06-05T02:37:24Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [25 July 2018 23:48 UTC](https://discourse.nodered.org/t/how-to-show-modal-dialog-in-template-node/611/5 "2018-07-25T23:48:07Z")

</div>

I believe you can add a plain javascript function to your send function (well, you'll have to create one first -- it looks like you are currently using the angular `scope.send(...)`).

```auto
<md-button class="md-raised" ng-click="clicked(); sendMsg(msg)"

```

Then in your sendMsg function, make sure they really want to continue before sending:

```auto
function sendMsg(msg) {
    if (confirm("Are you nuts?!?")) {
        $scope.send(msg);
    }
    else {
        console.warn("Whew! Crisis averted...");
    }
}

```

---

_[View the full topic](https://discourse.nodered.org/t/how-to-show-modal-dialog-in-template-node/611)._
