angularjs html5mode refresh page get 404

前端 未结 6 753
轮回少年
轮回少年 2020-12-08 21:53

I\'ve created an app using AngularJS with GAE (Google App Engine – Java).

I want to convert it compatible with SEO.

index.html

6条回答
  •  天命终不由人
    2020-12-08 22:17

    Try adding below section in your grunt file liverload middleware section.

    livereload: {
            options: {
              open: true,
              middleware: function (connect) {
                return [
                  connect.static('.tmp'),
                  connect().use(
                    '/bower_components',
                    connect.static('./bower_components')
                  ),
                  connect().use(
                    '/app/styles',
                    connect.static('./app/styles')
                  ),
                  connect().use(
                    '/apply',
                    connect.static('./app/index.html')
                  ),
                  connect.static(appConfig.app)
                ];
              }
            }
          }  
       }
    

提交回复
热议问题