var test=[
"testVal<br>by used",
"testVal by used2"
]
m.render(document.body,test.map(function(item){
return m("p",item)
}))
mithril do not handle "br" or "#10;"
//use m.request() to back this json
var test={
val1:"testVal<br>by used",
val2:"testVal by used2"
}
var show={
oninit:function(){
m.requery().then()
//response test's json
},
view:function(){
//return m("div",test.val1.replace("<br>","\n"))
return m("div",test.val2.toString())
}
}
Throw errors!
like 'replace' or 'toString',all JS string-methods not be used in this example;
@cnSonkwl
m.trust, like thism.requery should be m.request, but other than that it should workEdit: the numeric html code for line feed will still not work
Oh yes , m.trust works well for code1.
Most helpful comment
@cnSonkwl
m.trust, like thism.requeryshould bem.request, but other than that it should workEdit: the numeric html code for line feed will still not work