I generated an Angular app and when I run grunt server
it works (it shows the default page) but when I browse the files and double click index.html I get an empty page (except for the grey background).
Why is that? Isn't it just JS/CSS/HTML?
I generated an Angular app and when I run grunt server
it works (it shows the default page) but when I browse the files and double click index.html I get an empty page (except for the grey background).
Why is that? Isn't it just JS/CSS/HTML?
Depending on your setup some files usually need conversion- for instance your styles may well be in compass or SASS and need to be converted to regular css. Grunt handles all the various conversions you need (as well as launching the static page server).
Check out your console error log in the browser and I'll bet you'll see some "Failed to load resource" errors- for instance the css file may well not be there (when you're trying to run index.html directly).
By the way, you can run:
grunt build
This will create a new directory "dist" with everything converted and ready for distribution- sounds like this might be what you're looking for.