Tag: asset sync

Rails AngularJS指令和模板中的图像资源

我使用这些gem使用AngularJS进行Rails 4应用程序: gem’angularjs-rails’ gem’angular-rails-templates’ gem’asset_sync’ 它适用于这样的模板: 图像渲染正确。 但是在我的其他js petto.directive(‘ptAnimateHeart’, [‘Helper’, function(Helper){ linkFunc = function(scope, element, attributes) { $heartIcon = $(“#heart_icon”); if($heartIcon.length == 0) { $heartIcon = $(” “); $(document.body).append($heartIcon); } element.on(‘dblclick’, function(event){ $animateObj = $(this); Helper.animateHeart($animateObj); }); } return { restrict: ‘C’, link: linkFunc } }]) 我从浏览器控制台找不到’assets / feed.icon.heart.png’错误。 我在app / assets / feed.icon.heart.png下有feed.icon.heart.png。 ps:忘记提及我使用资产同步gem来托管amazon […]