Using Windows 7, Webstorm 10.0.1, current node.js, npm, bower, etc.
I created the default Webstorm AngularJS project, did not change anything and clicked "Run index.html". The page loaded but Angular was not running. From the source I saw that the files were missing <script src="bower_components/angular/angular.js"></script>. The directory bower_components was missing. Then I searched for it and it was created at C:\Users\<username>\bower_components whereas my Webstorm projects are under C:\Users\<username>\WebstormProjects\angularjs.
What configurations need to be changed to make my AngularJS app work?
Additional info:
.bowerrc
{
"directory": "app/bower_components"
}
bower.json
{
"name": "angular-seed",
"description": "A starter project for AngularJS",
"version": "0.0.0",
"homepage": "https://github.com/angular/angular-seed",
"license": "MIT",
"private": true,
"dependencies": {
"angular": "1.2.x",
"angular-route": "1.2.x",
"angular-loader": "1.2.x",
"angular-mocks": "~1.2.x",
"html5-boilerplate": "~4.3.0"
}
}
May be you are missing to install dependencies here.
In your project you have a bower.json file present. Go to that directory and run bower install command. This command will install all the specified dependencies of your project which is mentioned in bower.json
You need to edit .bowerrc in the root of your project folder and set the directory you want to use:
{
"directory" : "public/bower_components"
}
More info in Bower docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With