conditionalRendering.html (283B)
1 <body> 2 <script src="https://unpkg.com/moonjs"></script> 3 <div id="app5"> 4 <p m-if="condition">The Condition is True!</p> 5 </div> 6 <script> 7 const app5 = new Moon({ 8 el: "#app5", 9 data : { 10 condition: true 11 } 12 }); 13 </script> 14 <!-- in console: app5.set('condition', false) --> 15 </body>