I'm developing an Angular application and I'm using the following folder structure:
.
├── app
│ ├── assets
│ │ ├── images
│ │ │ ├── brands
│ │ │ ├── coletaSeletiva
│ │ │ ├── quiz
│ │ │ └── vidaEmLem
│ │ │ └── avatars
│ │ ├── sass
│ │ └── stylesheets
│ ├── scripts
│ │ └── controllers
│ └── views
│ └── coleta
└── test
└── spec
└── controllers
This is the yeoman angular generated project.
The generated css that come from SASS is pointing to files with the following path '/app/assets/...'
, because config in at the project's root.
My server is starting from app folder, so I call my assets using just /assets/...
What should I do?
Should I place config.rb inside of app folder and change assets paths?
My config.rb looks like this:
http_path = "/"
css_dir = "app/assets/stylesheets"
sass_dir = "app/assets/sass"
images_dir = "app/assets/images"
javascripts_dir = "app/assets/javascripts"
relative_assets = true
You can minify your code with "grunt" or "grunt --force". Then i think there will be no issues.
If still you got the issue of images . Try to set the path like ../images/image.png [if image folder is in parent folder] or ./images/image.png [if image folder is in the same folder] .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.