[V2] I want to call method of template page with dynamic load pop


#1

Thanks in advance.
I want to call “addgame” method. my code is below.

HTML
<template>
<a href="#" @click="openpopup" class="button col button-fill">Open popup</a>
</template> 

SCRIPT
<script>
methods: {
openpopup: function(){
var dynamicPopup = app.popup.create({
                  content:'<div class="popup">'+
                            '<div class="page">'+
                              '<div class="navbar">'+
                                '<div class="navbar-inner">'+
                                  '<div class="title">Add New Club</div>'+
                                  '<div class="right">'+
                                    '<a class="link popup-close">Close</a>'+
                                  '</div>'+
                                '</div>'+
                              '</div>'+
                            '</div>'+
                            '<div class="page-content">'+
                              '<form class="list" id="addclub">'+
                                '<ul>'+
                                  '<li>'+
                                    '<div class="item-content item-input">'+
                                      '<div class="item-inner">'+
                                        '<div class="item-title item-label">Full Name</div>'+
                                        '<div class="item-input-wrap">'+
                                          '<input type="text" name="TeamFullName" placeholder="Full Name (max. 10 charaters)">'+
                                        '</div>'+
                                      '</div>'+
                                    '</div>'+
                                  '</li>'+
                                  '<li>'+
                                    '<div class="item-content item-input">'+
                                      '<div class="item-inner">'+
                                        '<div class="item-title item-label">Short Name</div>'+
                                        '<div class="item-input-wrap">'+
                                          '<input type="text" name="TeamShortName" placeholder="Short Name (max. 5 characters)">'+
                                        '</div>'+
                                      '</div>'+
                                    '</div>'+
                                  '</li>'+
                                  '<li>'+
                                    '<div class="item-content item-input">'+
                                      '<div class="item-inner">'+
                                        '<div class="item-title item-label">Abbreviation</div>'+
                                        '<div class="item-input-wrap">'+
                                          '<input type="text" name="Abbreviation" placeholder="Short Name">'+
                                        '</div>'+
                                      '</div>'+
                                    '</div>'+
                                  '</li>'+
                                '</ul>'+
                                '<p><a href="#" @click="addgame" class="button col button-fill">Add Game</a></p>'+
                              '</form>'+
                            '</div>'+
                          '</div>',
                  // Events
                  on: {
                    open: function (popup) {
                      console.log('Popup open');
                    },
                    opened: function (popup) {
                      console.log('Popup opened');
                    },
                  }
                });
                dynamicPopup.open();
       },
addgame : function(){
console.log("Thank you so much for your help.")
}


}
</script>

#2

I want this too… Anybody know?