0
我開始在Rails應用上使用AngularJs。我想知道如何管理rails和angularj之間的通信。我想生成軌道模板,然後angularjs將執行控制器更新視圖:如何使用AngularJs和Rails管理視圖
.span6.box.applications{ "ng-controller" => "ApplicationListCtrl"}
.padding5.clearfix
.clearfix
%h2.inline.pull-left.no-border= t('home.titles.applications')
.content.top5
- if @applications.count > 0
%table.table.table-striped
%thead
%tr
%th= Application.human_attribute_name(:id)
%th= Application.human_attribute_name(:name)
%th
%tbody
%tr{ "ng-repeat" => "application in applications" }
/%div{ "ng-include" => "", "src" => "'/applications/new.html'" }
%td {{application.name}}
%td {{application.name}}
%td{ width: "50px"}
.pull-right
- if can? :edit, Application
%span.fui-gear{"data-toggle" => "tooltip", :title => t('form.settings'), "ng-click" => "edit()" }
- if can? :read, Application
%span.fui-search.left10{"data-toggle" => "tooltip", :title => t('form.show'), "ng-click" => "show()"}
的問題是,我有一個壞的視覺效果。它首先顯示我:
然後它會改變它:
它的工作原理,但我的視覺效果。我該如何管理。我怎樣才能創建模塊與AngularJs可重用?
[避免在angular.js編譯/插入文檔之前暫時顯示雙大括號表示法]可能的重複(http://stackoverflow.com/questions/12866447/prevent-double-curly-brace-notation-from-displaying - 立即先於角j)的 –