1

I have something like this:

-@ var id:String

%div{:dojoType => 'dojo.data.ItemFileReadStore', :jsType => 'store', :url => "/path/to/resource?id=#{id}"}

I was hoping variable interpolation would work here, but it just puts #{id} into the html. I also tried:

%div{:url => 'path/to/resource?id='+id}

And that doesn't even compile. What is the right way to do this?

Kevin
  • 24,871
  • 19
  • 102
  • 158

1 Answers1

2

The correct syntax is:

%div{:url => {"/path/to/resource?id="+id}}
Kevin
  • 24,871
  • 19
  • 102
  • 158