These are chat archives for riot/riot

Apr 2017
Fit Foodie App
Apr 12 2017 05:03
Does anyone know if riot is going to support namespaces in custom tags?
Sujith Krishnan
Apr 12 2017 07:09

@puppetmaster3 . Yes. I got it, jade will get rendered to html. But i was trying to add riot tags in jade template, and passing the data object from jade to tag

I achieved it in below way

Server Side
res.render('jadefile', data : data_from_server);

In Jade File

script(type="riot/tag", src="/path/to/mytag.tag")

riot.compile(function() {
var tags = riot.mount('*', {'config' : !{JSON.stringify(configs)}});

This way, data passed from server, which is available in jade - made available for tag (mytag).

Inside mytag.tag

   <div each="{ value, name  in}">
      <h3> {name} - {value}</h3>

Wish to know if there any better implementation possible than this !

Apr 12 2017 10:06
@sujith_krishnan_twitter I think you should use RIOT for SSR data binding. (and use Jade just for mark up)
@FitFoodApp_twitter RIOT is DOM based. If you are using namespaces in your .js you can continue to do that.
@fvezzoso file a bug maybe?
Sujith Krishnan
Apr 12 2017 10:10
@puppetmaster3 Thank you very much. Will check. (I am thinking to replace view render engine from jade to swig.)
Apr 12 2017 11:33
@sujith_krishnan_twitter you will get very little from that switch, pug is just fine. just learn how to SSE using RIOT.
@sujith_krishnan_twitter SSR, not SSE.
Federico Vezzoso
Apr 12 2017 15:46
Yeah, already did @puppetmaster3 :) riot/riot#2317