Thursday, 5 August 2021

angular dynamic base url binding

 dynamic base url


providers: [
    {
      provide: APP_BASE_HREF,
      useValue: window['base-href']
    }
    ],
  })


<base href="/">
  <script>
    window['base-href'] = window.location.pathname;
    console.log(window['base-href']);
  </script>

No comments:

Post a Comment

7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...