base href is case sensitive in Angular 2

后端 未结 4 841
囚心锁ツ
囚心锁ツ 2021-01-20 20:43

I have set the base ref like this for an Angular 2 app


If I go to localhost/MyApp everything works correctly.

4条回答
  •  感情败类
    2021-01-20 21:21

    You will have to write code to override base href.

    Possible locations you can override is 1. Angular2: Make route paths case insensitive

    1. You write your own location strategy & Ignore case sensitivity there. And in your app.module.ts, you tell ur Angular 2 app to use custom location strategy in your providers section.

      {provide:LocationStrategy,useClass:CustomPlatformLocation},

提交回复
热议问题