These are chat archives for ThoughtWorksInc/Binding.scala

19th
Jan 2018
林煒清(Lin Wei-Ching)
@superChing
Jan 19 2018 14:43
Hi, this code return error, but if I put the v2 binding val into render function it works. I do not understand where's problem?
val v1:Any = 1 
@dom
val v2 = Binding {
    v1 match {
      case x:String => <p>str</p>
      case x:Int => <p>int</p>
    }
}
@dom 
def render = { <p>{v2.bind}</p> }
dom.render(document.body, render)
林煒清(Lin Wei-Ching)
@superChing
Jan 19 2018 14:53
need help. thank you.
杨博 (Yang Bo)
@Atry
Jan 19 2018 16:05
StackOverflow seems like a better place to ask questions like this
Kahli Burke
@kahliburke
Jan 19 2018 18:07
@superChing Remove Binding from v2, it's already annotated with
@dom