角Rails的模板只是不工作 [英] Angular Rails Templates just not working

查看:111
本文介绍了角Rails的模板只是不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我就采用了棱角分明+轨以下思想家的教程( https://thinkster.io/angular-rails/ ) 。一切都很好,直到我尝试使用角导轨的模板将模板的JavaScript文件夹中。我是新来的轨道,所以我不知道这块宝石是如何工作的。但我没有按照教程多次,仍然没有工作。

I am following thinker's tutorials (https://thinkster.io/angular-rails/) on using angular+rails. everything is fine until I try to use angular-rails-templates to put templates in javascript folder. I am new to rails so I don't know how this gem works. but I did follow the tutorial multiple times and still not working.

要总结起来,似乎'模板'模块注入角度应用程序无法编译这些模板为templateCache,或者的application.js文件被忽视与.html扩展名的所有文件。

To sum up, it seems that the 'templates' module injected into angular app is not compiling those templates into templateCache, or the application.js file is ignoring all the files with .html extension.

下面是在github我的code:
<一href=\"https://github.com/collapsarzhang/demo-projects/tree/master/flapper-news\">https://github.com/collapsarzhang/demo-projects/tree/master/flapper-news

here is my code on github: https://github.com/collapsarzhang/demo-projects/tree/master/flapper-news

推荐答案

我发现了这里的解决方案:<一href=\"http://www.ademartutor.com/angular-rails-templates-gem-error-with-sprockets-3-0-o/\">http://www.ademartutor.com/angular-rails-templates-gem-error-with-sprockets-3-0-o/

The solution I found was here: http://www.ademartutor.com/angular-rails-templates-gem-error-with-sprockets-3-0-o/

这是一个链轮不兼容,但是2.1.3工程,以便在您的Gemfile使用:

It is a sprockets incompatibility but 2.1.3 works so use this in your Gemfile:

gem 'sprockets', '2.12.3'

(显然一个捆绑更新链轮将需要)

这篇关于角Rails的模板只是不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆