Hi stifan, I just wanted to share my recent experience with vue.js and web2py. At first I didn't want to give up things like sqlform. Then I tried to tweak the form generated by web2py with el1=form.element(...) to get a reference to the html element I wanted to add certain vue.js directives like v-if, v-model, ... It was so easy as: el1["_v-if"]="something"
It works but later I realized that it was not practical because I the logic spread between the controller, with the form generation, and vue.js directives, then the html view where I had more vue.js directives and components, and the main js vue controller. As I didn't want to renounce to the look and feel of web2py, because I just needed a very dynamic function made in vue, and the rest of the application could be made the traditional way with web2py, I resorted to generating just once the form with web2py and copying manually the resulting html code to the html view, and that way I just have to work with the html view and the JS code as usual in vue.js apps. With regard to passing data from the controller to vue.js, you can use {{=ASSIGNJS(key1=val1, key2=val2, ...)}} in your view and you will get those keys available as global vars in JavaScript with the needed translations to JSON in case you use complex values as lists, dicts, ... If anybody found a better way to integrate the things, please let us know. Hope this helps. Best regards. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.