ng-view not working with partials in AngularJS/Express

后端 未结 3 836
忘掉有多难
忘掉有多难 2021-01-19 00:14

Everything was working until I tried to display a partial file in ng-view.

/public/app/app.js

angular.module(\'app\', [\'ngResource\         


        
3条回答
  •  悲&欢浪女
    2021-01-19 01:03

    Not sure how much this will help but I notice all the bower packages are in the 'bower_components' directory. That is the default for bower unless you specify another directory. So, if you want the bower components installed say, '/public/vendor', do the following:

    1) create a file called ' .bowerrc ' and save it in your root directory ie. with gitignore, bower.json, etc.

    2) in the file put:

    {
      "directory": "public/vendor"
    }
    

    That will load the bower components where you want them. The file ' .bowerrc ' is a config file for bower and you can find the guidance at: http://bower.io/

    HTH

提交回复
热议问题