0
我想使这个:如何使另一个组件的参数中传递一个组件
<%= render MyProj.SnippetView, "doc_ready.html",
state: "DOMContentLoaded",
func: "setTimeout(function(){
#{render(MyProj.SnippetView, "scroll_page.html",
type: nil,
offset: -75,
target: @scrollTo,
duration: nil)}
}, 1)"
%>
,但我得到的错误:
protocol String.Chars not implemented for {:safe, [[[[[[[[["" | "var scrollOffset = "], "" | "-75"] | ";\nvar scrollTarget = "], [["" | "$(\"#"] | "imgasEmpresas16"] | "\").offset().top + scrollOffset"] | ";\n$('html, body').animate({scrollTop: scrollTarget"] | ""] | "}, \n "], "" | "1"] | ");"]}
是不是因为我不能做到这一点,或者因为我做错了?