khamsat khamsat khamsat

Modules

haxcv built to support MVC , but the missing part is Controller you can say MV
because the framework is a Controller of any modules once you create Model automatically haxcv create a Controller all in one
let's see the main syntax


<div fn-module="myController" ></div>
    

as you see above all in one DIV is a View and fn-module attr create model and finally you have Controller ready to use


<script type="text/javascript">
haxcv.module("myController" , ($xes) => { 
   
    myController.name = "Manassa Joseph";
    myController.age  = 23;

});
</script>
    

<div fn-module="myController" >
   <div >Name : <span v-scope="myController.name"></span> </div>
   <div >Age  : <span v-scope="myController.age"></span>  </div>
</div>   
    

<div fn-module="myController" >
   <div >Name : <span v-scope="myController.name"></span> </div>
   <div >Age  : <span v-scope="myController.age"></span>  </div>
   <div fn-click fn-exec="myController.alert(5 , 5)" >alert</div>
</div>   

<script type="text/javascript">
haxcv.module("myController" , ($xes) => { 
   
    myController.name = "Manassa Joseph";
    myController.age  = 23;
    myController.alert = function(a , b){
       alert( a + b);
    }

});
</script>   
    
khamsat khamsat khamsat khamsat