更新时间:2022-04-23 00:05:01
You can use the locals or collections as specified over here http://docs.rhomobile.com/rhodes/ui#advanced-usage-of-render
<%= render :partial =>"mypartial", :locals => { :event => "myevent" } %>
然后局部使用,像
<div class="eventList"><%= event %></div>
第二,如果您为控制器中的实例变量分配了一些值,
Second, if you assign some value to the instance variable in the controller,
@event = "myevent"
然后您可以在部分内部直接访问它,
then you can directly access it inside the partial as below,
<div class="eventList"><%= @event %></div>
这些是您可以用来传递变量的一些方法.
These are some of the ways you can use to pass the variables.