【问题标题】:AngularJS Rails giving blank pageAngularJS Rails 给出空白页
【发布时间】:2015-10-14 22:09:37
【问题描述】:

我正在关注thinkster.io/angular-rails的教程

到目前为止,我已经结束了这个阶段

将前端与资产管道集成

但现在我的应用程序在 Chrome 控制台或 WebRick 控制台上给我一个空白页面,没有错误

这是我在尝试转到http://localhost:3000/#/home 时看到的

Started GET "/" for ::1 at 2015-10-14 18:57:54 -0300
Processing by ApplicationController#angular as HTML
  Rendered layouts/application.html.erb within layouts/application (95.2ms)
Completed 200 OK in 177ms (Views: 176.4ms | ActiveRecord: 0.0ms)


Started GET "/assets/bootstrap/dist/css/bootstrap.css.map" for ::1 at 2015-10-14 18:57:59 -0300

如果我尝试访问 http://localhost:3000,我会在 WebRick 上看到所有这些

Started GET "/" for ::1 at 2015-10-14 19:02:09 -0300
Processing by ApplicationController#angular as HTML
  Rendered layouts/application.html.erb within layouts/application (55.3ms)
Completed 200 OK in 106ms (Views: 105.9ms | ActiveRecord: 0.0ms)


Started GET "/assets/bootstrap/dist/css/bootstrap-b0009f9e25467a0cf98029ba5cea5cc6.css?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/application-ebcbb47a1897dc658f254d3ed27f8059.css?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/angular/angular-2d5a33d94b093db45bb7a9ede7fb19cd.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/app-aa9fab9c243b33abeab86ad1957ed641.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/angular-ui-router/release/angular-ui-router-baa37ca0378f13b403a5dbcdc9aa5155.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/angular-rails-templates-4c1f2ca110b30578d07f9cc497121e81.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/home/mainCtrl-b29014101de152dbd6e2c9dc5c28ece7.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/posts/posts-35d84f25af005d974cc5973c2ef26354.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/posts/_posts-bc8b8c3f542abacc3b5e9ad028f3cb96.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/posts/postsCtrl-5ef10d79585a7fc3d40aa58e799fbf70.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/application-c0bc5d796fa367b0c956d35d8a01fdb4.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/home/_home-583f0c3e136561b0bb8b62359042f948.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/bootstrap/dist/css/bootstrap.css.map" for ::1 at 2015-10-14 19:02:09 -0300


Started GET "/assets/application-c0bc5d796fa367b0c956d35d8a01fdb4.js?body=1" for ::1 at 2015-10-14 19:02:09 -0300

你可以在这里查看我的源代码 https://bitbucket.org/federicogiust/flapper-news/src

【问题讨论】:

    标签: javascript ruby-on-rails ruby angularjs


    【解决方案1】:

    找到问题了。

    我仍然在部分 _home.html 和 _posts.html 中有脚本标签。

    我删除了脚本标签,现在可以正常工作了。

    【讨论】:

      猜你喜欢
      • 2011-10-20
      • 2022-01-16
      • 1970-01-01
      • 2019-02-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多