Quiero usar Framework7 sin ReactJS o Vue. Quiero usar JS puro. Pero cuando trato de mostrar un cuadro de diálogo, aparece un error de consola:
Uncaught TypeError: n is undefinedEse es mi código JavaScript
var app = new Framework7({ root: '#app', name: 'My App', theme: 'ios', domCache: true }); var mainView = app.views.create('.view-main'); $('.open-alert').on('click', function () { window.app.dialog.alert('Oops! Testing alert.'); });y esa es la parte HTML:
<!DOCTYPE html> <html lang="de-DE"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#2196f3"> <meta name="viewport" content="width=device-width, initial-rotate=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="https://v5.framework7.io/packages/core/css/framework7.bundle.min.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> </head> <body> <div id="phone"> <div id="app"> <div class="statusbar"></div> <div class="view view-main"> <div data-name="home" class="page"> <button class="col button button-fill open-alert">Alert</button> </div> </div> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script type="text/javascript" src="https://v5.framework7.io/packages/core/js/framework7.bundle.min.js"></script> <script type="text/javascript" src="js/app.js"></script> </body> </html>Busqué algunos ejemplos, pero nada funciona. ¿Tal vez necesito agregar algo más?