0
我正在使用angular-rails-templates插件來預載資產中的html文件/ javascript /模板(鏈接修復不起作用)angular-rails-templates(模板正在緩存,但ng-include不起作用)
當我使用的檢查,我可以看到CacheTemplate被觸發:
// Angular Rails Template // source: app/assets/javascripts/templates/bannertime.html angular.module("templates").run(["$templateCache", function($templateCache) { $templateCache.put("bannertime.html", '<section id="landing-page-banner">') }]);
我app.js
app = angular.module('logged_out', ['templates', 'ng'])
app.controller "logged_out", ($scope) ->
$scope.banana = "hello banana face"
我index.html.erb
<div ng-app="logged_out" ng-controller="logged_out">
<div class="container-fluid">
<div ng-include="bannertime.html"></div>
</div>
</div>
有人可以向我解釋爲什麼ng-include不可能工作嗎?我已經爲此工作了3天。