0

我正在尝试使用 angularjs-rails gem 在 rails 应用程序中使用 Angularjs。在这里,我将在 rails 表单视图中包含表单(模块 ng 中的指令)。

我不知道如何 在<%= form_for(@result) do |f|中插入ng-controller="Ctrl" %>

任何帮助

4

1 回答 1

1

To insert html attributes to the form_for helper in rails

{ "ng-controller" => "Ctrl" } do |f| %>

Hope that helps.

于 2013-06-07T18:42:35.427 回答