Reputation: 502
I am fairly new to the mean stack, and when I switch from importing angular from cdn to bower in layout.jade my app stopped working. I am getting a "ReferenceError: angular is not defined" and 404s for all the sources I am trying to import.
This is how my layout.jade looks(I also tried ../ and ../../ in front, but got the same results):
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
This is my project structure:
bin
bower_components
node_modules
public
routes
views
layout.jade
app.js
package.js
Upvotes: 0
Views: 27
Reputation: 2443
I assume that public_html is root directory for your webserver. In that case server doesn't have access to bower_components directory. And won't return anything from bower_components.
To solve this move bower_components directory to public_html.
Upvotes: 1