简体   繁体   中英

Angular 6 why index.html removed from URL

I have an angular application deployed to SharePoint but when page load "index.aspx" has been removed from the URL, so when user refresh it's given him different page URL and doesn't have permission for that URL

For this fix change a little angular.json

{
  "projects": {
    "yourApp": {
      "projectType": "application",
      "root": "",
      "sourceRoot": "src",
      "prefix": "app",
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "index": "src/index.html", // place where you put path
          },
        }
      }
    }
  }
}

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM