changingData.html (240B)
1 <body> 2 <script src="https://unpkg.com/moonjs"></script> 3 <div id="app2"> 4 <p>{{msg}}</p> 5 </div> 6 <script> 7 const app2 = new Moon({ 8 el: "#app2", 9 data: { 10 msg: "Hello Moon!" 11 } 12 }); 13 app2.set('msg', "Changed Message!"); 14 </script> 15 </body>