【问题标题】:Problems including bower installs in layout.jade包括凉亭安装在 layout.jade 中的问题
【发布时间】:2016-05-12 13:24:34
【问题描述】:

我对平均堆栈相当陌生,当我从在 layout.jade 中从 cdn 导入 angular 切换到 bower 时,我的应用程序停止工作。我正在尝试导入的所有源都收到“ReferenceError:未定义角度”和 404。

这就是我的 layout.jade 的样子(我也在前面尝试了 ../ 和 ../../,但得到了相同的结果):

doctype html
html(ng-app='RIThym')
  head
    title= title
    link(rel='stylesheet', href='/stylesheets/style.css')
    script(src='bower_components/angular/angular.js')
    script(src='bower_components/angular-resource/angular-resource.js')
    script(src='bower_components/angular-route/angular-route.js')
    script(src='bower_components/angular-ui-map/ui-map.js')
    script(src='/javascripts/RIThym.js')
  body
    block content

这是我的项目结构:

bin

凉亭组件

节点模块

公开

路线

观看次数

layout.jade

app.js

package.js

【问题讨论】:

    标签: angularjs pug bower mean-stack


    【解决方案1】:

    我假设 public_html 是您的网络服务器的根目录。在这种情况下,服务器无权访问 bower_components 目录。并且不会从 bower_components 返回任何内容。

    为了解决这个问题,将 bower_components 目录移动到 public_html。

    【讨论】:

      猜你喜欢
      • 2014-08-08
      • 2014-07-01
      • 1970-01-01
      • 2017-03-18
      • 1970-01-01
      • 2013-07-03
      • 2014-02-09
      • 2013-05-23
      • 2017-03-14
      相关资源
      最近更新 更多